linux-cultist / venv-selector.nvim

Allows selection of python virtual environment from within neovim
MIT License
444 stars 46 forks source link

how to change python interpreter in neotest-python #45

Closed YAOYouYou closed 1 year ago

linux-cultist commented 1 year ago

Hi,

I havent used neotest-python but i read the config example, and it has a setting called python to set the python interpreter.

VenvSelect gives you the selected python interpreter if you call require("venv-selector").get_active_path().

So what is needed is some way to update neotest-pythons python interpreter every time you select a new venv in VenvSelect. You probably cant call its setup() function more than once, so check with the author if there is a way to dynamically update which python interpreter it should use. Maybe you can just call some internal function.

Hope you understand what i mean, otherwise ask. :)

YAOYouYou commented 1 year ago

thank you very much