Skip to content

Swenv plugin to switch between vritual environmnts. #51

Open
@skimask9

Description

@skimask9
{ "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!"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions