single hook with use-package
This commit is contained in:
@@ -3,17 +3,7 @@
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package flycheck
|
||||
;; Enable for only languages
|
||||
:init
|
||||
;; (add-hook 'after-init-hook 'global-flycheck-mode)
|
||||
(add-hook 'c++-mode-hook 'flycheck-mode)
|
||||
;; (add-hook 'emacs-lisp-mode-hook 'flycheck-mode)
|
||||
(add-hook 'html-mode-hook 'flycheck-mode)
|
||||
(add-hook 'js-mode-hook 'flycheck-mode)
|
||||
(add-hook 'web-mode-hook 'flycheck-mode)
|
||||
(add-hook 'sh-mode-hook 'flycheck-mode)
|
||||
:config
|
||||
;; support web-mode with PHP
|
||||
(flycheck-define-checker mix-php
|
||||
@@ -27,7 +17,14 @@
|
||||
:modes (php-mode php+-mode web-mode))
|
||||
|
||||
(add-to-list 'flycheck-checkers 'mix-php)
|
||||
)
|
||||
;; Enable for only languages
|
||||
:hook
|
||||
(c++-mode . flycheck-mode)
|
||||
;; (emacs-lisp-mode flycheck-mode)
|
||||
(html-mode . flycheck-mode)
|
||||
(js-mode . flycheck-mode)
|
||||
(web-mode . flycheck-mode)
|
||||
(sh-mode . flycheck-mode))
|
||||
|
||||
(provide 'init-flycheck)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user