Expand eglot-ensure check to look for pyright OR pylsp

This commit is contained in:
Evie Litherland-Smith 2024-10-22 11:55:43 +01:00
parent 6e3b832119
commit 6df746a4a6

View file

@ -1365,7 +1365,7 @@ Configure email with iCalendar event support, to integrate with
("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))))
(python-base-mode . (lambda () (if (executable-find "pyright" t) (eglot-ensure))))
(python-base-mode . (lambda () (if (or (executable-find "pyright" t) (executable-find "pylsp" t)) (eglot-ensure))))
(lua-mode . (lambda () (if (executable-find "lua-language-server" t) (eglot-ensure))))
((rust-ts-mode rust-mode) . (lambda () (if (executable-find "rust-analyzer" t) (eglot-ensure))))
((js-base-mode typescript-ts-base-mode) . (lambda () (if (executable-find "typescript-language-server" t) (eglot-ensure)))))