linux-cultist / venv-selector.nvim

Allows selection of python virtual environment from within neovim
MIT License
388 stars 41 forks source link

How to suppress error when running autocmd #26

Closed joinemm closed 1 year ago

joinemm commented 1 year ago

Using the autocmd in the readme, when I open a file that has no cached virtualenv i get an error reading cache. is there a way to suppress this error and just have it silently check if any cached venv exists?

linux-cultist commented 1 year ago

I think we should change that so there is no error message. It makes a lot of sense. :)

It should be an easy change and if you want to make a PR for it, feel free. Otherwise I can look into it in a couple of days. Very busy at work right now...

joinemm commented 1 year ago

I agree, there is no reason to throw an error there. Looking at the code it seems like simply removing the line would do it. Going to make a PR.