Move NvimTree file explorer to left side
- Change side from 'right' to 'left' in nvim-tree.lua - Update edgy.nvim config to place NvimTree in left panel
This commit is contained in:
55
lua/cargdev/plugins/venv-selector.lua
Normal file
55
lua/cargdev/plugins/venv-selector.lua
Normal file
@@ -0,0 +1,55 @@
|
||||
return {
|
||||
"linux-cultist/venv-selector.nvim",
|
||||
branch = "regexp",
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"mfussenegger/nvim-dap-python",
|
||||
},
|
||||
ft = "python",
|
||||
keys = {
|
||||
{ "<leader>vs", "<cmd>VenvSelect<cr>", desc = "Select Python venv" },
|
||||
{ "<leader>vc", "<cmd>VenvSelectCached<cr>", desc = "Select cached venv" },
|
||||
},
|
||||
opts = {
|
||||
settings = {
|
||||
search = {
|
||||
root = vim.fn.getcwd(),
|
||||
workspace = true,
|
||||
file = true,
|
||||
anaconda_envs = true,
|
||||
anaconda_base = true,
|
||||
pipenv = true,
|
||||
poetry = true,
|
||||
hatch = true,
|
||||
virtualenvs = true,
|
||||
pyenv = true,
|
||||
venv = true,
|
||||
},
|
||||
options = {
|
||||
on_venv_activate_callback = nil,
|
||||
enable_default_searches = true,
|
||||
enable_cached_venvs = true,
|
||||
cached_venv_automatic_activation = true,
|
||||
activate_venv_in_terminal = true,
|
||||
set_environment_variables = true,
|
||||
notify_user_on_venv_activation = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("venv-selector").setup(opts)
|
||||
|
||||
-- Auto-select venv when opening Python files
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "python",
|
||||
callback = function()
|
||||
local venv = vim.fn.findfile("pyproject.toml", vim.fn.getcwd() .. ";")
|
||||
if venv ~= "" then
|
||||
require("venv-selector").retrieve_from_cache()
|
||||
end
|
||||
end,
|
||||
once = true,
|
||||
})
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user