mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-03-26 08:10:39 -07:00
Treat paths as paths, rather than strings. Removes the requirements that doom-*-dir variables end in slash (though I'll continue doing so as a convention). Also moves a lot of cache/data into the current profile's cache/data directories. Shouldn't actually affect anything for folks not using Doom's profile system (yet). Fix: #8616
1.7 KiB
1.7 KiB
:tools lsp API demos
set-eglot-client!
;; For setting a single server command:
(set-eglot-client! 'python-mode
`(,(file-name-concat doom-profile-data-dir \"lsp/mspyls/Microsoft.Python.LanguageServer\")))
;; This is equivalent to
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs `(python-mode . (,(file-name-concat doom-profile-data-dir "lsp/mspyls/Microsoft.Python.LanguageServer\")))))
(set-eglot-client! '(python-mode python-ts-mode)
"pylsp" "pyls"
'("basedpyright" "--stdio")
'("basedpyright-langserver" "--stdio")
'("pyright" "--stdio")
'("pyright-langserver" "--stdio")
'("pyrefly" "lsp")
"jedi-language-server"
'("ruff" "server")
"ruff-lsp")
;; This is equivalent to
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
`(python-mode
. ,(eglot-alternatives '("pylsp" "pyls"
("basedpyright" "--stdio")
("basedpyright-langserver" "--stdio")
("pyright" "--stdio")
("pyright-langserver" "--stdio")
("pyrefly" "lsp")
"jedi-language-server"
("ruff" "server")
"ruff-lsp"))))))