linux-cultist / venv-selector.nvim

Allows selection of python virtual environment from within neovim
MIT License
378 stars 40 forks source link

Can't find any pyenv virtual environments on new version #132

Closed joebonneau closed 4 weeks ago

joebonneau commented 1 month ago

Hi,

I tried switching over to the new version of the plugin, but I can't seem to get it set up such that my pyenv venvs are discovered. I'm on Mac and they're all located in the default location, ~/.pyenv/versions. Any ideas?

Thanks!

linux-cultist commented 1 month ago

Hi,

Interesting. Can you list the path to python files under ~/.pyenv/versions? I think that will give us some clue what's going on.

Just want to understand why it's not picking them up. It's good that you are on a mac, I haven't been able to test on a mac myself so I assumed it would work the same as on Linux. But maybe not. :)

joebonneau commented 1 month ago

Here's what I see:

image

Appears that everything but the python versions installed by pyenv (which I do see in the selector) are symlinks, and those symlinks are to environments located within those installations.

linux-cultist commented 1 month ago

Oh I think I understand now. The plugin needs to list symbolic links in that path and also don't expect them to end with the python name. I will fix this tomorrow, thanks for reporting it in. :)

joebonneau commented 1 month ago

Awesome, glad that was straightforward for you!

Also, thanks for creating this plugin. I was surprised how much trouble I had getting my venv to activate properly within my nvim instance before finding it. Appreciate your work.

linux-cultist commented 4 weeks ago

Update the plugin and try now please. :) I changed the default fd pyenv search to include all virtual envs created by it now. It should include all symlinks now also.

image

joebonneau commented 4 weeks ago

Works as expected now! Thanks for the quick fix.