AckslD / swenv.nvim

Tiny plugin to quickly switch python virtual environments from within neovim without restarting.
206 stars 29 forks source link

Conda support? #3

Closed lkhphuc closed 1 year ago

lkhphuc commented 1 year ago

Would be great to have conda support. I'm trying to use this with neovide since neovide doesn't pickup the python env when it started up.

AckslD commented 1 year ago

Sounds good @lkhphuc! I don't use conda so probably won't implement this myself but it you or anyone else would like to feel free to open a PR.

ChristianChiarulli commented 1 year ago

not sure if you're still looking for conda support @AckslD but if you are you can try out this PR: https://github.com/AckslD/swenv.nvim/pull/6

meicale commented 1 year ago

I cannot change the conda env. I can list and pic all the conda env, but it doesn't works. I can not you the "require('swenv.api').get_current_venv()" which return nothing. But I tried ":!which python" it give me the right python path in conda env. That is wired. I just modify the envs_path = vim.fn.expand('~/anaconda/envs'). Did I do anything wrong? CondaChangeEnv command from other plugin works.

AckslD commented 1 year ago

Is it working for you @ChristianChiarulli ?

skolj commented 1 year ago

I cannot change the conda env. I can list and pic all the conda env, but it doesn't works. I can not you the "require('swenv.api').get_current_venv()" which return nothing. But I tried ":!which python" it give me the right python path in conda env. That is wired. I just modify the envs_path = vim.fn.expand('~/anaconda/envs'). Did I do anything wrong? CondaChangeEnv command from other plugin works.

Could you try setting CONDA_EXE environment variable to your anaconda envs path (~/anaconda/envs based on your comment) and leave the default value for venvs_path?