Files
dotfiles/nvim/lua/plugins/venv.lua

23 lines
457 B
Lua

vim.api.nvim_create_autocmd('BufEnter', {
pattern = '*.py',
callback = function()
local venv = vim.fn.finddir('.venv', vim.fn.getcwd() .. ';')
if venv ~= '' then
require('venv-selector').retrieve_from_cache()
end
end,
once = true,
})
return {
'linux-cultist/venv-selector.nvim',
branch = "regexp",
opts = {
name = ".venv",
},
event = 'VeryLazy',
keys = {
{ '<leader>vs', '<cmd>VenvSelect<cr>' },
},
}