Add eglot keybinds
This commit is contained in:
parent
01009b782a
commit
90c5afd4f2
22
init.el
22
init.el
|
@ -310,8 +310,21 @@
|
|||
:config
|
||||
(which-key-mode))
|
||||
|
||||
(use-package flymake
|
||||
:ensure nil
|
||||
:bind (:map flymake-mode-map
|
||||
("M-n" . flymake-goto-next-error)
|
||||
("M-p" . flymake-goto-prev-error)))
|
||||
|
||||
(use-package eglot
|
||||
:demand nil
|
||||
:ensure nil
|
||||
:bind (:map eglot-mode-map
|
||||
("C-c e c" . eglot-code-actions)
|
||||
("C-c e r" . eglot-rename)
|
||||
("C-c e f" . eglot-format)
|
||||
("C-c e s" . eglot-shutdown)
|
||||
("C-c e S" . eglot-shutdown-all)
|
||||
("C-c e R" . eglot-reconnect))
|
||||
:hook
|
||||
(c-mode . eglot-ensure)
|
||||
(c-ts-mode . eglot-ensure)
|
||||
|
@ -319,13 +332,10 @@
|
|||
(c++-ts-mode . eglot-ensure)
|
||||
(java-mode . eglot-ensure)
|
||||
(java-ts-mode . eglot-ensure)
|
||||
(nix-mode . eglot-ensure)
|
||||
:custom
|
||||
(eglot-events-buffer-size 0)
|
||||
(eglot-autoshutdown t)
|
||||
:config
|
||||
(add-hook 'eglot-managed-mode-hook
|
||||
(lambda ()
|
||||
(setq-local indent-region-function #'eglot-format))))
|
||||
(eglot-autoshutdown t))
|
||||
|
||||
(use-package eglot-java
|
||||
:hook java-mode java-ts-mode)
|
||||
|
|
Loading…
Reference in a new issue