AckslD / swenv.nvim

Tiny plugin to quickly switch python virtual environments from within neovim without restarting.
212 stars 29 forks source link

error occur #24

Closed JINNMnm closed 11 months ago

JINNMnm commented 11 months ago

after installing it, when i call :lua require("swenv.api").pick_venv() and it shows: E5108: Error executing lua vim/shared.lua:0: src: expected table, got nil stack traceback: [C]: in function 'error' vim/shared.lua: in function 'validate' vim/shared.lua: in function 'list_extend' ...nvim/site/pack/packer/start/swenv.nvim/lua/swenv/api.lua:124: in function 'get_venvs' ...nvim/site/pack/packer/start/swenv.nvim/lua/swenv/api.lua:132: in function 'pick_venv' [string ":lua"]:1: in main chunk

ikkihou commented 11 months ago

same error as u

image
Adictya commented 11 months ago

It's happening cuz of a missing return statement after https://github.com/AckslD/swenv.nvim/blob/a85fc11dbf1bf0fa4aa3b683443957e8789da5e5/lua/swenv/api.lua#L101 , added it locally which fixes it, seems like small miss, should only be a matter of time before the authors fix it.

ikkihou commented 11 months ago

Excellent👍, thanks for ur suggestion! The bug fixed

JINNMnm commented 11 months ago

thx bro! Bug fixed!

AckslD commented 11 months ago

sorry my bad, should be fixed now