diff options
author | jao <jao@gnu.org> | 2022-10-03 02:33:03 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-10-03 02:33:52 +0100 |
commit | 2a4e0a964ec915865ddafded2757fab97fa4ff3b (patch) | |
tree | ab229f662f475ffe3c4eccfc6b6a600428ab481f /init.el | |
parent | ebe8f2601761a42a2ac511d514a491b9ae91d935 (diff) | |
download | elibs-2a4e0a964ec915865ddafded2757fab97fa4ff3b.tar.gz elibs-2a4e0a964ec915865ddafded2757fab97fa4ff3b.tar.bz2 |
hlint-refactor/flymake-hlint (not sure if we need eglot/lsp)
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 34 |
1 files changed, 26 insertions, 8 deletions
@@ -1988,18 +1988,23 @@ (use-package flymake :ensure t :custom ((flymake-mode-line-format '(" " flymake-mode-line-counters))) - :config (jao-define-attached-buffer "^\\*Flymake diagnostics .*\\*\\'") - :bind (:map flymake-mode-map (("M-m n" . flymake-goto-next-error) - ("M-m p" . flymake-goto-prev-error) - ("M-m i" . flymake-show-diagnostic) - ("M-m f" . flymake-show-buffer-diagnostics) - ("M-m l" . consult-flymake)))) + :config + (jao-define-attached-buffer "^\\*Flymake diagnostics .*\\*\\'") + + (transient-define-prefix jao-transient-flymake () + ["Flymake" + ("d" "show diagnostics" flymake-show-buffer-diagnostics) + ("i" "show diagnostic" flymake-show-diagnostic) + ("n" "next error" flymake-goto-next-error) + ("p" "previous error" flymake-goto-prev-error) + ("c" "consult flymake" consult-flymake)]) + + :bind (:map flymake-mode-map (("M-m" . jao-transient-flymake)))) ;;;; eglot (use-package eglot :ensure t - :bind (:map eglot-mode-map (("C-h ." . jao-eldoc-toggle))) - :hook ((haskell-mode . eglot-ensure))) + :bind (:map eglot-mode-map (("C-h ." . jao-eldoc-toggle)))) ;;;; workarounds (setq c-type-finder-time-slot nil) @@ -2250,6 +2255,19 @@ ("C-M-p" . flymake-goto-prev-error) ("<f3>" . haskell-session-kill)))) +(use-package hlint-refactor + :ensure t + :after haskell-mode + :hook ((haskell-mode . hlint-refactor-mode)) + :bind (:map haskell-mode-map (("C-M-h" . 'hlint-refactor-refactor-at-point) + ("C-M-S-h" . 'hlint-refactor-refactor-buffer))) + :diminish) + +(use-package flymake-hlint + :ensure t + :after haskell-mode + :hook ((haskell-mode . flymake-hlint-load))) + (require 'haskell) (diminish 'interactive-haskell-mode " λ") |