swenv.nvim
swenv.nvim copied to clipboard
pick_env() does not detect .venv
I have the same issue
$ nvim --version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
And I use lunarvim.
EDIT: After some debugging, it is because of the read_venv_name_in_project function and the line:match('^prompt%s*=%s*(.*)') condition. Here is how look my pyenv.cfg (I use venv module, is there other modules that handle virtual envs differently maybe ?).
$ cat /home/paul/<REDACTED>/.venv/pyvenv.cfg
home = /home/paul/<REDACTED>/.venv/bin
include-system-site-packages = false
version = 3.10.16
Thanks for reporting, I probably won't have a lot of time to look into this in the near term, if anyone has a solution, feel free to open a PR.