diff options
-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 " λ") |