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
: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
(setq eglot-events-buffer-size 0)
(add-to-list 'eglot-server-programs