Move flycheck init hooks into lang modules
This commit is contained in:
parent
21648b863e
commit
a8af7a8df8
8 changed files with 9 additions and 17 deletions
|
@ -9,16 +9,6 @@
|
||||||
;; Removed checks on idle/change for snappiness
|
;; Removed checks on idle/change for snappiness
|
||||||
flycheck-check-syntax-automatically '(save mode-enabled idle-change)
|
flycheck-check-syntax-automatically '(save mode-enabled idle-change)
|
||||||
flycheck-disabled-checkers '(emacs-lisp-checkdoc make))
|
flycheck-disabled-checkers '(emacs-lisp-checkdoc make))
|
||||||
|
|
||||||
(add-hook! (ruby-mode
|
|
||||||
python-mode
|
|
||||||
go-mode
|
|
||||||
php-mode
|
|
||||||
lua-mode
|
|
||||||
shell-mode
|
|
||||||
scss-mode
|
|
||||||
c++-mode
|
|
||||||
c-mode) 'flycheck-mode)
|
|
||||||
:config
|
:config
|
||||||
(add-unreal-buffer! "^\\*Flycheck.*\\*$")
|
(add-unreal-buffer! "^\\*Flycheck.*\\*$")
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
:init
|
:init
|
||||||
(associate! c++-mode :match "\\.h$")
|
(associate! c++-mode :match "\\.h$")
|
||||||
(associate! objc-mode :match "\\.mm$")
|
(associate! objc-mode :match "\\.mm$")
|
||||||
|
(add-hook! (c-mode c++-mode) 'flycheck-mode)
|
||||||
:config
|
:config
|
||||||
(setq c-basic-offset 4
|
(setq c-basic-offset 4
|
||||||
c-tab-always-indent nil
|
c-tab-always-indent nil
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
(use-package go-mode
|
(use-package go-mode
|
||||||
:mode "\\.go$"
|
:mode "\\.go$"
|
||||||
:interpreter "go"
|
:interpreter "go"
|
||||||
:init (add-hook! go-mode 'emr-initialize)
|
:init
|
||||||
|
(add-hook! go-mode '(emr-initialize flycheck-mode))
|
||||||
:config
|
:config
|
||||||
(bind! :map go-mode-map
|
(bind! :map go-mode-map
|
||||||
:n "gd" 'godef-jump
|
:n "gd" 'godef-jump
|
||||||
|
|
|
@ -7,9 +7,8 @@
|
||||||
(setq-default lua-indent-level tab-width)
|
(setq-default lua-indent-level tab-width)
|
||||||
;; (after! company-dict
|
;; (after! company-dict
|
||||||
;; (add-to-list 'company-dict-minor-mode-alist 'love-mode))
|
;; (add-to-list 'company-dict-minor-mode-alist 'love-mode))
|
||||||
(add-hook! lua-mode
|
(add-hook! lua-mode '(narf|enable-tab-width-2 flycheck-mode))
|
||||||
(narf|enable-tab-width-2)
|
(add-hook! lua-mode (setq lua-indent-level 2)))
|
||||||
(setq lua-indent-level 2)))
|
|
||||||
|
|
||||||
(define-minor-mode love-mode
|
(define-minor-mode love-mode
|
||||||
"Buffer local minor mode for Love2D"
|
"Buffer local minor mode for Love2D"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
(use-package php-mode
|
(use-package php-mode
|
||||||
:mode "\\.\\(php\\|inc\\)$"
|
:mode "\\.\\(php\\|inc\\)$"
|
||||||
:init
|
:init
|
||||||
|
(add-hook! php-mode 'flycheck-mode)
|
||||||
(setq php-template-compatibility nil
|
(setq php-template-compatibility nil
|
||||||
php-extras-eldoc-functions-file (concat narf-temp-dir "php-extras-eldoc-functions"))
|
php-extras-eldoc-functions-file (concat narf-temp-dir "php-extras-eldoc-functions"))
|
||||||
:config
|
:config
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
:interpreter ("python" . python-mode)
|
:interpreter ("python" . python-mode)
|
||||||
:commands python-mode
|
:commands python-mode
|
||||||
:init
|
:init
|
||||||
(add-hook! python-mode '(narf|enable-tab-width-4 emr-initialize))
|
(add-hook! python-mode '(narf|enable-tab-width-4 emr-initialize flycheck-mode))
|
||||||
(setq python-indent-offset 4
|
(setq python-indent-offset 4
|
||||||
python-environment-directory narf-temp-dir
|
python-environment-directory narf-temp-dir
|
||||||
python-shell-interpreter "ipython")
|
python-shell-interpreter "ipython")
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"/\\(Gem\\|Cap\\|Vagrant\\|Rake\\)file$")
|
"/\\(Gem\\|Cap\\|Vagrant\\|Rake\\)file$")
|
||||||
:interpreter "ruby"
|
:interpreter "ruby"
|
||||||
:init
|
:init
|
||||||
(add-hook! ruby-mode 'narf|enable-tab-width-2)
|
(add-hook! ruby-mode '(narf|enable-tab-width-2 flycheck-mode))
|
||||||
(build-for! ruby-mode "rake %s" "Rakefile")
|
(build-for! ruby-mode "rake %s" "Rakefile")
|
||||||
:config
|
:config
|
||||||
;; Formatting
|
;; Formatting
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
(use-package scss-mode
|
(use-package scss-mode
|
||||||
:mode "\\.scss$"
|
:mode "\\.scss$"
|
||||||
:init
|
:init
|
||||||
(add-hook! scss-mode '(narf|enable-tab-width-2 hs-minor-mode))
|
(add-hook! scss-mode '(narf|enable-tab-width-2 hs-minor-mode flycheck-mode))
|
||||||
(setq-default css-indent-offset 2)
|
(setq-default css-indent-offset 2)
|
||||||
(setq scss-compile-at-save nil)
|
(setq scss-compile-at-save nil)
|
||||||
:config
|
:config
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue