AckslD / swenv.nvim

Tiny plugin to quickly switch python virtual environments from within neovim without restarting.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with pyright

julkip opened this issue · comments

I have run into some issues using pyright (with nvim-lsp) in combination with swenv.nvim. When I use swenv to switch my venv I see that the correct venv is running in lualine and my toggleterm is also using the correct venv. But code checking or completion with lsp does not work. Doing :LspRestart does not help.

When I source cd into my project folder, source the venv by hand and then start nvim from there the lsp is working as expected.

Upon some further investigation I found a way not to solve, but to circumvent this issue. When I use pylsp instead of pyright everything works just as expected.

Hi @julkip, hmm strange, it does work for me. What is your setup for lsp, pyright etc?