diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index a0c0c0603..5d28b0ea8 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -33,7 +33,20 @@ (when (modulep! +lsp) (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 :persist t