Why
A developer whose Python projects use a different venv convention gets silent failures where LSP commands fall back to system executables, with no indication of which path patterns are expected or why.
Current state
lua/config/plugins/lang/python.lua contains a venv resolution function that checks four hardcoded path patterns in sequence. None of the four paths has an inline comment identifying which toolchain or project structure it targets (e.g. uv, legacy venv, pyenv-virtualenv). There is no comment documenting the fallback behaviour when none of the paths exist. PYENV_ROOT is referenced in at least one path but not explained at the point of use.
Ideal state
- Each candidate path in the venv lookup has an inline comment identifying its toolchain target, e.g.:
-- uv default (.venv at project root)
-- legacy virtualenv (venv/ at project root)
-- pyenv-virtualenv (via PYENV_ROOT)
- A comment after the lookup states the fallback behaviour when no venv is found (e.g. falls back to system Python, LSP uses system executable).
Out of scope
Adding support for additional venv conventions; changes to how the resolved path is consumed by LSP config.
Starting points
lua/config/plugins/lang/python.lua — venv resolution function
QA plan
- Read the venv lookup function — expect each candidate path to have a comment identifying its toolchain.
- Read the fallback path — expect a comment stating what happens when no venv is matched.
Done when
Every candidate path in the venv lookup has an inline comment naming its toolchain target, and a fallback comment documents the no-venv-found behaviour.
Why
A developer whose Python projects use a different venv convention gets silent failures where LSP commands fall back to system executables, with no indication of which path patterns are expected or why.
Current state
lua/config/plugins/lang/python.luacontains a venv resolution function that checks four hardcoded path patterns in sequence. None of the four paths has an inline comment identifying which toolchain or project structure it targets (e.g.uv, legacyvenv,pyenv-virtualenv). There is no comment documenting the fallback behaviour when none of the paths exist.PYENV_ROOTis referenced in at least one path but not explained at the point of use.Ideal state
-- uv default (.venv at project root)-- legacy virtualenv (venv/ at project root)-- pyenv-virtualenv (via PYENV_ROOT)Out of scope
Adding support for additional venv conventions; changes to how the resolved path is consumed by LSP config.
Starting points
lua/config/plugins/lang/python.lua— venv resolution functionQA plan
Done when
Every candidate path in the venv lookup has an inline comment naming its toolchain target, and a fallback comment documents the no-venv-found behaviour.