mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-16 15:56:52 -05:00
Picked up by the :lang emacs-lisp module's elisp-demos package when displaying help.el/helpful documentation.
1.6 KiB
1.6 KiB
:tools lsp API demos
set-eglot-client!
;; For setting a single server command:
(set-eglot-client! 'python-mode
`(,(concat doom-data-dir \"lsp/mspyls/Microsoft.Python.LanguageServer\")))
;; This is equivalent to
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs `(python-mode . (,(concat doom-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"))))))