Format before save when using eglot

This commit is contained in:
larstvei 2024-03-22 19:54:31 +01:00
parent 476b8fdb5a
commit 2d2481e11d

View File

@ -1523,7 +1523,9 @@
(use-package eglot (use-package eglot
:defer t :defer t
:hook (eglot-managed-mode . (lambda () (eglot-inlay-hints-mode -1))) :hook (eglot-managed-mode . (lambda ()
(eglot-inlay-hints-mode -1)
(add-hook 'before-save-hook 'eglot-format nil t)))
:config :config
(setq eglot-events-buffer-size 0) (setq eglot-events-buffer-size 0)
(add-to-list 'eglot-server-programs (add-to-list 'eglot-server-programs