Tweak eglot and flymake to improve performance

This commit is contained in:
Evie Litherland-Smith 2024-07-04 10:11:34 +01:00
parent 49760ddc58
commit 09e291abf3

22
init.el
View file

@ -854,8 +854,8 @@
(use-package eldoc
:custom
(eldoc-echo-area-display-truncation-message nil)
(eldoc-echo-area-prefer-doc-buffer t)
(eldoc-echo-area-use-multiline-p nil))
(eldoc-echo-area-prefer-doc-buffer 'maybe)
(eldoc-echo-area-use-multiline-p 3))
(use-package eglot
:demand
@ -865,9 +865,22 @@
: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-menu-string "lsp")
(eglot-send-changes-idle-time 1)
(eglot-extend-to-xref t)
(eglot-autoshutdown t)
(eglot-sync-connect nil)
(eglot-connect-timeout 5)
(eglot-autoreconnect (* 60 5))
(eglot-events-buffer-config '(:size 0))
(eglot-ignored-server-capabilities
'(:documentHighlightProvider
:documentFormattingProvider
:documentRangeFormattingProvider
:documentOnTypeFormattingProvider
:documentLinkProvider
:colorProvider
:foldingRangeProvider))
:init
(setq eglot-stay-out-of '(flymake))
:config
@ -917,7 +930,10 @@
(use-package flymake
:bind (("C-c C-." . flymake-goto-next-error)
("C-c C-," . flymake-goto-prev-error))
:hook (prog-mode . (lambda () (flymake-mode +1))))
:hook (prog-mode . (lambda () (flymake-mode +1)))
:custom
(flymake-no-changes-timeout 1)
(flymake-show-diagnostics-at-end-of-line nil))
(use-package flymake-popon
:diminish