Add more modes for eglot-ensure: Lua & JS/TS

Add a suitable time for eglot-autoreconnect (5 minutes of running)
instead of being disabled
This commit is contained in:
Evie Litherland-Smith 2024-06-26 13:37:07 +01:00
parent 4f131024a8
commit d6edbe1f2b

13
init.el
View file

@ -868,12 +868,12 @@
:bind ( :map prog-mode-map
("C-c c a" . eglot-code-actions)
("C-c c r" . eglot-rename))
:hook ((nix-mode . eglot-ensure)
:hook (((nix-mode lua-mode js-base-mode typescript-ts-base-mode) . eglot-ensure)
(eglot-managed-mode . (lambda () (add-hook 'flymake-diagnostic-functions 'eglot-flymake-backend nil t))))
:custom
(eglot-extend-to-xref t)
(eglot-autoshutdown t)
(eglot-autoreconnect nil)
(eglot-autoreconnect (* 60 5))
:init
(setq eglot-stay-out-of '(flymake))
:config
@ -903,15 +903,6 @@
:flake
( :autoArchive t
:nixpkgsInputName "nixpkgs")))))
;; (with-eval-after-load 'cape
;; (advice-add 'eglot-completion-at-point :around #'cape-wrap-buster)
;; (defun my/eglot-capf ()
;; (setq-local completion-at-point-functions
;; (list (cape-capf-super
;; #'eglot-completion-at-point
;; #'tempel-expand
;; #'cape-file))))
;; (add-hook 'eglot-managed-mode-hook #'my/eglot-capf))
)
(use-package apheleia