Rework eglot configuration to use built-in package

This commit is contained in:
Laurens Miers 2025-05-25 17:26:38 +02:00
parent f2dc1fe496
commit 6c24da4503

View file

@ -731,15 +731,21 @@ https://github.com/victorhge/iedit
** Eglot
#+BEGIN_SRC emacs-lisp
(use-package eglot)
(use-package eglot
:ensure nil
:custom
(eglot-autoshutdown t)
:init
(setq eglot-stay-out-of '(xref))
(add-hook 'prog-mode-hook 'eglot-ensure)
(add-hook 'eglot-managed-mode-hook (lambda ()
(if (eglot-managed-p)
(add-hook 'xref-backend-functions 'eglot-xref-backend)
(remove-hook 'xref-backend-functions 'eglot-xref-backend)
)))
)))
)
#+END_SRC
** Markdown-mode