Update Python path when activating a venv for LSP compat.

This commit is contained in:
Daniel McKnight 2025-06-06 13:55:51 -07:00
parent 3d90957006
commit 6acae117b3

View file

@ -80,6 +80,10 @@ return {
command = "fdfind -p '.*/bin/python$' ~/Code/.venvs", command = "fdfind -p '.*/bin/python$' ~/Code/.venvs",
}, },
}, },
post_set_venv = function()
local venv_path = require("venv-selector").get_active_path()
vim.env.PYTHONPATH = venv_path .. "/lib/python3.*/site-packages"
end
}, },
}, },
} }