Add some more eglot-ensure hooks for different languages

This commit is contained in:
Evie Litherland-Smith 2024-12-03 10:08:45 +00:00
parent 7db580359d
commit 87692cc787

View file

@ -1101,7 +1101,11 @@
("C-c c a" . eglot-code-actions)
("C-c c r" . eglot-rename))
:hook ((eglot-managed-mode . (lambda () (add-hook 'flymake-diagnostic-functions 'eglot-flymake-backend nil t)))
(nix-mode . (lambda () (if (executable-find "nixd" t) (eglot-ensure)))))
(nix-mode . (lambda () (if (executable-find "nixd" t) (eglot-ensure))))
(python-base-mode . (lambda () (if (executable-find "pylsp" nil) (eglot-ensure))))
((lua-mode lua-ts-mode) . (lambda () (if (executable-find "lua-language-server" nil) (eglot-ensure))))
((rust-mode rust-ts-mode) . (lambda () (if (executable-find "rust-analyzer" nil) (eglot-ensure))))
(js-ts-mode . (lambda () (if (executable-find "typescript-language-server" nil) (eglot-ensure)))))
:custom
(eglot-menu-string "lsp")
(eglot-send-changes-idle-time 0.5)