mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-14 15:46:56 -05:00
fix(python): eglot not recognizing (based)?pyright
Because the upstream python entries in eglot-server-programs assume basedpyright-langserver and pyright-langserver to be the executable names. Fix: #8436
This commit is contained in:
@@ -33,7 +33,20 @@
|
|||||||
|
|
||||||
(when (modulep! +lsp)
|
(when (modulep! +lsp)
|
||||||
(add-hook 'python-mode-local-vars-hook #'lsp! 'append)
|
(add-hook 'python-mode-local-vars-hook #'lsp! 'append)
|
||||||
(add-hook 'python-ts-mode-local-vars-hook #'lsp! 'append))
|
(add-hook 'python-ts-mode-local-vars-hook #'lsp! 'append)
|
||||||
|
|
||||||
|
;; REVIEW: PR this upstream, which assumes the wrong names for the
|
||||||
|
;; (based)pyright executables.
|
||||||
|
(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"))
|
||||||
|
|
||||||
(set-repl-handler! '(python-mode python-ts-mode) #'+python/open-repl
|
(set-repl-handler! '(python-mode python-ts-mode) #'+python/open-repl
|
||||||
:persist t
|
:persist t
|
||||||
|
Reference in New Issue
Block a user