 ;; Show the name of sniffs in PHP code warnings (eg show
 ;; "Generic.CodeAnalysis.VariableAnalysis.UnusedVariable" in an unused
 ;; variable warning)
-(setq flymake-phpcs-show-rule t)
+;;(setq flymake-phpcs-show-rule t)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;
 ;; USER CONFIGURABLES ;;

;;;;;;;;;;;;;

(defalias 'yes-or-no-p 'y-or-n-p)

;;;;;;;;;;;
;; HOOKS ;;


(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))

(custom-set-variables

 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(js2-basic-offset 2)
 '(js2-bounce-indent-p t)
 '(wakatime-python-bin "/usr/bin/python"))

;; wakatime
(setq wakatime-api-key "2579cd0a-ac6b-4065-85f4-c1c2116d360a")
(setq wakatime-cli-path "/usr/local/bin/wakatime")

;; tide
(defun setup-tide-mode ()
  (interactive)
  (tide-setup)
  (flycheck-mode +1)
  (setq flycheck-check-syntax-automatically '(save mode-enabled))
  (eldoc-mode +1)
  (tide-hl-identifier-mode +1)
  (company-mode +1))

;; aligns annotation to the right hand side
(setq company-tooltip-align-annotations t)

;; formats the buffer before saving
(add-hook 'before-save-hook 'tide-format-before-save)

(add-hook 'typescript-mode-hook #'setup-tide-mode)


;;;;;;;;;;;;;;;;;;
;; KEY BINDINGS ;;
