diff --git a/lua/lazyvim/plugins/extras/lang/python.lua b/lua/lazyvim/plugins/extras/lang/python.lua index 4c098452..40c7b0c3 100644 --- a/lua/lazyvim/plugins/extras/lang/python.lua +++ b/lua/lazyvim/plugins/extras/lang/python.lua @@ -116,9 +116,7 @@ return { "linux-cultist/venv-selector.nvim", branch = "regexp", -- Use this branch for the new version cmd = "VenvSelect", - enabled = function() - return LazyVim.has("telescope.nvim") - end, + enabled = true, opts = { settings = { options = { @@ -128,7 +126,23 @@ return { }, -- Call config for python files and load the cached venv automatically ft = "python", - keys = { { "cv", ":VenvSelect", desc = "Select VirtualEnv", ft = "python" } }, + keys = { + { + "cv", + function() + if LazyVim.has("telescope.nvim") then + vim.cmd(":VenvSelect") + else + vim.notify( + "VenvSelect currently requires Telescope.nvim: https://github.com/LazyVim/LazyVim/discussions/5081", + vim.log.levels.WARN + ) + end + end, + desc = "Select VirtualEnv", + ft = "python", + }, + }, }, {