LunarVim/starter.lvim

Swenv plugin to switch between vritual environmnts.

skimask9 opened this issue · 1 comments

{ "AckslD/swenv.nvim",
   config = function()
     require('swenv').setup({
       -- Should return a list of tables with a `name` and a `path` entry each.
       -- Gets the argument `venvs_path` set below.
       -- By default just lists the entries in `venvs_path`.
       get_venvs = function(venvs_path)
         return require('swenv.api').get_venvs(venvs_path)
       end,
       -- Path passed to `get_venvs`.
       venvs_path = vim.fn.expand('~/venvs'),
       -- Something to do after setting an environment
       post_set_venv = nil,
     })
   end
 },

lvim.builtin.which_key.mappings["P"] = {
 name = "Python",
 i = { "<cmd>lua require('swenv.api').pick_venv()<cr>", "Pick Env" },
 d = { "<cmd>lua require('swenv.api').get_current_venv()<cr>", "Show Env" },
}

get_current_venv doesn't work at all
pick_venv failed with the error "venvs is not accessible by the current user!"