Update Python path when activating a venv for LSP compat.
This commit is contained in:
parent
3d90957006
commit
6acae117b3
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue