summaryrefslogtreecommitdiffstats
path: root/emacs/init.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-04-15 00:11:37 +0200
committerGravatar Tom Willemse2013-04-15 00:11:37 +0200
commit881a2bb3e5bde01ae5273cdb83a89d9cccfa8adb (patch)
tree0facf9c9ec549a726c9831a57dd71f489a13f35a /emacs/init.el
parent2f9e38cab2465e8505629e069228ac13a45a5611 (diff)
downloaddotfiles-881a2bb3e5bde01ae5273cdb83a89d9cccfa8adb.tar.gz
dotfiles-881a2bb3e5bde01ae5273cdb83a89d9cccfa8adb.zip
Enable flycheck for some more modes
Also put all the hook additions in a single place, instead of in each special function. Both the advantages to this method are: - Being able to see in a second where flycheck is enabled. - If all minor modes are added separately it's easy to see exactly which are enabled for a specific mode, just by looking at its hook variable.
Diffstat (limited to 'emacs/init.el')
-rw-r--r--emacs/init.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 8e7fd45..0391d87 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -57,6 +57,21 @@ package.el is loaded anyway."
(add-hook 'sawfish-mode-hook 'paredit-mode)
(add-hook 'scheme-mode-hook 'paredit-mode)
+;;; Enable Flycheck for some modes.
+
+(add-hook 'css-mode-hook 'flycheck-mode)
+(add-hook 'emacs-lisp-mode-hook 'flycheck-mode)
+(add-hook 'go-mode-hook 'flycheck-mode)
+(add-hook 'html-mode-hook 'flycheck-mode)
+(add-hook 'js2-mode-hook 'flycheck-mode)
+(add-hook 'lua-mode-hook 'flycheck-mode)
+(add-hook 'php-mode-hook 'flycheck-mode)
+(add-hook 'python-mode-hook 'flycheck-mode)
+(add-hook 'rst-mode-hook 'flycheck-mode)
+(add-hook 'ruby-mode-hook 'flycheck-mode)
+(add-hook 'rust-mode-hook 'flycheck-mode)
+(add-hook 'sh-mode-hook 'flycheck-mode)
+
;;; Remove the pylint and pyflakes checkers from the flycheck
;;; configuration so the flake8 checker remains.
(eval-after-load "flycheck"