diff options
author | Martin Polden <mpolden@mpolden.no> | 2019-12-19 21:53:07 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2019-12-19 21:54:20 +0100 |
commit | db998e9ea3d48c7cf708b907d10317dc2a438bef (patch) | |
tree | c9d562acc0e28499679ad96629448b254fa8914d /lisp | |
parent | f0acf5824a44eb6c0d3818c4c5dc90464aae3adb (diff) |
Replace flycheck with flymake
* The improved flymake version in Emacs 26 seems good enough
* Allows removal of lsp-ui dependency which was only used for flycheck
integration
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-flycheck.el | 17 | ||||
-rw-r--r-- | lisp/init-flymake.el | 9 | ||||
-rw-r--r-- | lisp/init-lsp-mode.el | 13 | ||||
-rw-r--r-- | lisp/init-python-mode.el | 3 | ||||
-rw-r--r-- | lisp/init-rust-mode.el | 6 |
5 files changed, 12 insertions, 36 deletions
diff --git a/lisp/init-flycheck.el b/lisp/init-flycheck.el deleted file mode 100644 index f9ef2ab..0000000 --- a/lisp/init-flycheck.el +++ /dev/null @@ -1,17 +0,0 @@ -(use-package flycheck - :init - ;; disable noisy checkers - (setq-default flycheck-disabled-checkers - '(emacs-lisp emacs-lisp-checkdoc go-golint)) - - ;; prefer python 3 - (let ((python "python3")) - (when (executable-find python) - (setq flycheck-python-flake8-executable python - flycheck-python-pycompile-executable python - flycheck-python-pylint-executable python))) - - :config - (global-flycheck-mode 1)) - -(provide 'init-flycheck) diff --git a/lisp/init-flymake.el b/lisp/init-flymake.el new file mode 100644 index 0000000..58f056b --- /dev/null +++ b/lisp/init-flymake.el @@ -0,0 +1,9 @@ +(use-package flyspell + ;; package is bundled with emacs + :ensure nil + + :bind (:map flymake-mode-map + ;; C-d shows a list of all errors + ("C-c d" . flymake-show-diagnostics-buffer))) + +(provide 'init-flymake) diff --git a/lisp/init-lsp-mode.el b/lisp/init-lsp-mode.el index 2dc4fbc..46a0e40 100644 --- a/lisp/init-lsp-mode.el +++ b/lisp/init-lsp-mode.el @@ -8,8 +8,6 @@ :init ;; disable yasnippet support (setq lsp-enable-snippet nil) - ;; prefer lsp-ui - (setq lsp-prefer-flymake nil) :hook ;; enable lsp in go-mode ((go-mode . lsp) @@ -21,15 +19,4 @@ ;; C-c p organizes imports and reformats buffer ("C-c p" . organize-imports-and-format))) -(use-package lsp-ui - :commands lsp-ui-mode - :init - ;; disable sideline - (setq lsp-ui-sideline-enable nil) - ;; do not show documentation - (setq lsp-ui-doc-enable nil) - :hook - ;; enable lsp-ui-mode in lsp-mode - (lsp . lsp-ui-mode)) - (provide 'init-lsp-mode) diff --git a/lisp/init-python-mode.el b/lisp/init-python-mode.el index 72f4088..2bca144 100644 --- a/lisp/init-python-mode.el +++ b/lisp/init-python-mode.el @@ -2,6 +2,9 @@ :ensure nil ;; package is bundled with emacs :config + ;; use flake8 as flymake backend + (setq python-flymake-command '("flake8" "-")) + ;; set buffer local variables (add-hook 'python-mode-hook (lambda () ;; disable electric indent diff --git a/lisp/init-rust-mode.el b/lisp/init-rust-mode.el index 2179191..e44425e 100644 --- a/lisp/init-rust-mode.el +++ b/lisp/init-rust-mode.el @@ -6,10 +6,4 @@ ;; C-c p runs rustfmt on the buffer ("C-c p" . rust-format-buffer))) -;; configure flycheck to support cargo project layout -(use-package flycheck-rust - :commands flycheck-rust-setup - :after (flycheck rust-mode) - :hook ((flycheck-mode . flycheck-rust-setup))) - (provide 'init-rust-mode) |