lua layer: move flycheck config in a post-init function

This commit is contained in:
syl20bnr 2015-04-04 01:02:37 -04:00
parent 4283417d11
commit bdf370c050

View file

@ -1,10 +1,14 @@
(defvar lua-packages
'(
flycheck
lua-mode
)
"List of all packages to install and/or initialize. Built-in packages
which require an initialization must be listed explicitly in the list.")
(defun lua/post-init-flycheck ()
(add-hook 'lua-mode-hook 'flycheck-mode))
(defun lua/init-lua-mode ()
(use-package lua-mode
:defer t
@ -14,7 +18,6 @@ which require an initialization must be listed explicitly in the list.")
(progn
(setq lua-indent-level 2
lua-indent-string-contents t)
(add-hook 'lua-mode-hook 'flycheck-mode)
(evil-leader/set-key-for-mode 'lua-mode "md" 'lua-search-documentation)
(evil-leader/set-key-for-mode 'lua-mode "msb" 'lua-send-buffer)
(evil-leader/set-key-for-mode 'lua-mode "msf" 'lua-send-defun)