Tweak eglot and flymake to improve performance
This commit is contained in:
parent
49760ddc58
commit
09e291abf3
22
init.el
22
init.el
|
@ -854,8 +854,8 @@
|
||||||
(use-package eldoc
|
(use-package eldoc
|
||||||
:custom
|
:custom
|
||||||
(eldoc-echo-area-display-truncation-message nil)
|
(eldoc-echo-area-display-truncation-message nil)
|
||||||
(eldoc-echo-area-prefer-doc-buffer t)
|
(eldoc-echo-area-prefer-doc-buffer 'maybe)
|
||||||
(eldoc-echo-area-use-multiline-p nil))
|
(eldoc-echo-area-use-multiline-p 3))
|
||||||
|
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
:demand
|
:demand
|
||||||
|
@ -865,9 +865,22 @@
|
||||||
:hook (((nix-mode lua-mode js-base-mode typescript-ts-base-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))))
|
(eglot-managed-mode . (lambda () (add-hook 'flymake-diagnostic-functions 'eglot-flymake-backend nil t))))
|
||||||
:custom
|
:custom
|
||||||
|
(eglot-menu-string "lsp")
|
||||||
|
(eglot-send-changes-idle-time 1)
|
||||||
(eglot-extend-to-xref t)
|
(eglot-extend-to-xref t)
|
||||||
(eglot-autoshutdown t)
|
(eglot-autoshutdown t)
|
||||||
|
(eglot-sync-connect nil)
|
||||||
|
(eglot-connect-timeout 5)
|
||||||
(eglot-autoreconnect (* 60 5))
|
(eglot-autoreconnect (* 60 5))
|
||||||
|
(eglot-events-buffer-config '(:size 0))
|
||||||
|
(eglot-ignored-server-capabilities
|
||||||
|
'(:documentHighlightProvider
|
||||||
|
:documentFormattingProvider
|
||||||
|
:documentRangeFormattingProvider
|
||||||
|
:documentOnTypeFormattingProvider
|
||||||
|
:documentLinkProvider
|
||||||
|
:colorProvider
|
||||||
|
:foldingRangeProvider))
|
||||||
:init
|
:init
|
||||||
(setq eglot-stay-out-of '(flymake))
|
(setq eglot-stay-out-of '(flymake))
|
||||||
:config
|
:config
|
||||||
|
@ -917,7 +930,10 @@
|
||||||
(use-package flymake
|
(use-package flymake
|
||||||
:bind (("C-c C-." . flymake-goto-next-error)
|
:bind (("C-c C-." . flymake-goto-next-error)
|
||||||
("C-c C-," . flymake-goto-prev-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
|
(use-package flymake-popon
|
||||||
:diminish
|
:diminish
|
||||||
|
|
Loading…
Reference in a new issue