Switch out flycheck for flymake and add eglot keybindings
This commit is contained in:
parent
d4e928f09e
commit
24177998de
@ -15,12 +15,6 @@
|
||||
([remap indent-for-tab-command] #'company-indent-or-complete-common)
|
||||
([remap c-indent-line-or-region] #'company-indent-or-complete-common))
|
||||
|
||||
;; Flycheck gives you error squigglies
|
||||
(use-package flycheck
|
||||
:hook (after-init . global-flycheck-mode)
|
||||
:custom
|
||||
(flycheck-disabled-checkers '(emacs-lisp-checkdoc emacs-lisp)))
|
||||
|
||||
;; Quick file overview for supported modes
|
||||
(use-package imenu
|
||||
:straight (:type built-in)
|
||||
@ -47,6 +41,21 @@
|
||||
`(html-web-mode . ,(eglot-alternatives
|
||||
'(("vscode-html-language-server" "--stdio")
|
||||
("html-languageserver" "--stdio")))))
|
||||
:init
|
||||
(defvar eglot-prefix-map (make-sparse-keymap)
|
||||
"Prefix keymap for eglot commands.")
|
||||
(general-def eglot-prefix-map
|
||||
"a" #'eglot-code-actions
|
||||
"r" #'eglot-reconnect
|
||||
"s" #'eglot-shutdown
|
||||
"R" #'eglot-rename
|
||||
"f" #'eglot-format-buffer
|
||||
"i" #'eglot-code-action-organize-imports
|
||||
"h" #'eldoc
|
||||
"e" #'flymake-show-buffer-diagnostics
|
||||
"E" #'flymake-show-project-diagnostics)
|
||||
:general
|
||||
(eglot-mode-map "C-c l" `(,eglot-prefix-map :which-key "eglot"))
|
||||
:hook
|
||||
(java-mode . eglot-ensure)
|
||||
(rust-mode . eglot-ensure)
|
||||
|
Loading…
Reference in New Issue
Block a user