swenv.nvim icon indicating copy to clipboard operation
swenv.nvim copied to clipboard

pick_env() does not detect .venv

Open Mitutoyum opened this issue 10 months ago • 2 comments

Mitutoyum avatar Feb 18 '25 01:02 Mitutoyum

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

plaffitt avatar Feb 28 '25 12:02 plaffitt

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.

AckslD avatar Mar 12 '25 07:03 AckslD