Nearly working

This commit is contained in:
Smaug123
2024-03-23 01:06:01 +00:00
parent 93b5fc92e9
commit 47b5993422
5 changed files with 68 additions and 15 deletions

View File

@@ -1,7 +1,6 @@
local venv_selector = require 'venv-selector'
venv_selector.setup {
--- other configuration
changed_venv_hooks = { venv_selector.hooks.pyright },
name = { "venv", ".venv" },
}
@@ -10,6 +9,7 @@ vim.api.nvim_create_autocmd('VimEnter', {
desc = 'Auto select virtualenv Nvim open',
pattern = '*',
callback = function()
-- Mystery: this seems to be being called twice whenever we open nvim
local venv = vim.fn.findfile('pyproject.toml', vim.fn.getcwd() .. ';')
if venv ~= '' then
require('venv-selector').retrieve_from_cache()