From 6bd38e2c4d0e2580cff6e8b9bd8ef74afcdc4729 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 1 Jul 2025 13:45:40 +0200 Subject: [PATCH] tweak(python): don't use basedpyright by default Because of the python dev's propensity to use env managers, setting the pyright executable globally doesn't make much sense, and could in fact end up intrusively overriding a user's local settings. A better approach may be to introduce an envvar here that can be set from external .envrc or venv config files, or making `lsp-pyright-langserver-command` a safe file-local variable (so it can be set from .dir-locals.el or in the file-local variables of a python file), but if I decide to do one or the other, I'd like to be consistent about it across all python executables/external dependencies (and possibly even to all :lang modules that depend on env managers), so I'll defer implementing that until I have the time to give it more thought and plan it better. Amend: 1fa1eba5ac38 --- modules/lang/python/config.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index 6739dc71d..cac6d80c1 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -265,7 +265,4 @@ :when (modulep! +lsp) :when (modulep! +pyright) :when (modulep! :tools lsp -eglot) - :defer t - :init - (when (executable-find "basedpyright") - (setq lsp-pyright-langserver-command "basedpyright"))) + :defer t)