Files
dotfiles/nvim/lua/plugins/venv.lua
2025-08-31 12:18:26 +02:00

22 lines
433 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',
opts = {
name = ".venv",
},
event = 'VeryLazy',
keys = {
{ '<leader>vs', '<cmd>VenvSelect<cr>' },
},
}