rafi / vim-venom

Select Python runtimes or activate virtual-environments while working in Neo/Vim.
32 stars 7 forks source link

Does not work with .venv file in directory #1

Closed GordianDziwis closed 3 years ago

GordianDziwis commented 3 years ago

Activating venv in terminal and then starting neovim works, but venon does not find the venv. Do you rely on any env vars?

rafi commented 3 years ago

The plugin tries to find the venv by itself:

Can you explain your layout and how you created your virtualenv?

danielebra commented 3 years ago

@BonaBeavis are you having issues with coc?

I had similar issue with the auto complete of coc not working when using vim-venom and noticed it worked when sourcing the virtual environment before opening a file with neovim.

Have you tried running :CocRestart after vim-venom has ran? It had fixed this issue for me.

Alternatively this autocmd can automate it

autocmd User VenomActivated CocRestart
GordianDziwis commented 3 years ago

@rafi I created the env with mkvenv from zsh-autoswitch-virtualenv. In the root of the project directory is a .venv file where the content is the name of the virtual env. And this is the issue:

  1. .venv with bibtex-shacl-shapes does not work
  2. .venv with ~/.virtualenvs/bibtex-shacl-shapes works

zsh-autoswitch replicates virtualenvwrappers setup there is a env var named WORKON_HOME which contains the reference to $HOME/.virtualenvs.

Python is quite nice but venvs are a bit of pita.

@danielebra I use coc, but this was not the issue.

GordianDziwis commented 3 years ago

3