diff options
author | Franck Cuny <fcuny@twitter.com> | 2018-10-22 20:47:26 -0700 |
---|---|---|
committer | Franck Cuny <fcuny@twitter.com> | 2018-10-22 20:47:26 -0700 |
commit | f0a035e095db100fa1361f9900e7577a9e79e893 (patch) | |
tree | 063d8c2b66fb2332577b61ad00326db4ccccb896 | |
parent | [emacs] Don't import ruby stuff in the path (diff) | |
download | emacs.d-f0a035e095db100fa1361f9900e7577a9e79e893.tar.gz |
[emacs] Some update for flycheck and go.
-rw-r--r-- | configs/rcs/emacs.d/init.el | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/configs/rcs/emacs.d/init.el b/configs/rcs/emacs.d/init.el index 842dc20..ff43b51 100644 --- a/configs/rcs/emacs.d/init.el +++ b/configs/rcs/emacs.d/init.el @@ -257,10 +257,7 @@ (use-package flycheck :ensure t :custom - (flycheck-idle-change-delay 2) - :config - (setq-default flycheck-disabled-checkers '(html-tidy emacs-lisp emacs-lisp-checkdoc)) - (global-flycheck-mode)) + (flycheck-idle-change-delay 2)) (use-package lisp-mode :bind @@ -273,21 +270,23 @@ (use-package go-mode :ensure t - :preface + :after (exec-path-from-shell) + :hook (go-mode . fcuny/go-mode-setup) + :init (defun fcuny/go-mode-setup () - (setq-default) (setq tab-width 2) (add-hook 'before-save-hook 'gofmt-before-save)) :config - (add-hook 'go-mode-hook #'fcuny/go-mode-setup)) + (when (memq windows-system '(mac ns)) + (exec-path-from-shell-copy-env "GOPATH"))) (use-package python - :mode (("\\.py$" . python-mode)) + :mode (("\\.py$" . python-mode) + ("BUILD\\'" . python-mode)) :commands python-mode :custom (python-indent-offset 2)) (use-package sh-script - :after (flycheck) :mode ("bashrc" . sh-mode) :hook (after-save . executable-make-buffer-file-executable-if-script-p) :config @@ -311,16 +310,18 @@ :ensure t) (use-package json-mode - :after (flyspell) + :after (flyspell flycheck) :custom (json-reformat:indent-width 2) (js-indent-level 2) - :hook ((json-mode . flyspell-prog-mode)) + :hook ((json-mode . flyspell-prog-mode) + (json-mode . flycheck-mode)) :init - (if (fc/check-work-machine-p) + (if (fcuny/check-work-machine-p) (add-to-list 'auto-mode-alist '("\\.workflow$" . json-mode)))) (use-package protobuf-mode - :after (flyspell) + :after (flyspell flycheck) :ensure t - :hook ((protobuf-mode . flyspell-prog-mode))) + :hook ((protobuf-mode . flyspell-prog-mode) + (protobuf-mode . flycheck-mode))) |