Only add eglot bindings in modes deriving from prog-mode

This commit is contained in:
Charlotte Van Petegem 2023-02-21 14:26:41 +01:00
parent a4a0affeb6
commit 1dce67746b
No known key found for this signature in database
GPG key ID: 019E764B7184435A

View file

@ -35,11 +35,14 @@
(use-package eglot (use-package eglot
:general :general
(lmap (lmap
:keymaps 'prog-mode-map
"SPC s" '(eglot :which-key "Add buffer to eglot") "SPC s" '(eglot :which-key "Add buffer to eglot")
"SPC f" '(eglot-format :which-key "Format region") "SPC f" '(eglot-format :which-key "Format region")
"SPC F" '(eglot-format :which-key "Format buffer") "SPC F" '(eglot-format :which-key "Format buffer")
"SPC r" '(eglot-rename :which-key "Rename symbol") "SPC r" '(eglot-rename :which-key "Rename symbol")
"SPC a" '(eglot-code-actions :which-key "Relevant local actions") "SPC a" '(eglot-code-actions :which-key "Relevant local actions")
"SPC n" '(flymake-goto-next-error :which-key "Next error")
"SPC p" '(flymake-goto-prev-error :which-key "Previous error")
) )
:config :config
;;; eclipse-jdt breaks the spec which in turn breaks code actions ;;; eclipse-jdt breaks the spec which in turn breaks code actions