fix(python): only enable venv-selector when telescope is availble. See #3612

This commit is contained in:
Folke Lemaitre
2024-06-13 17:01:38 +02:00
parent 48a70aa8f5
commit 74c1766479

View File

@ -96,10 +96,14 @@ return {
end, end,
}, },
}, },
{ {
"linux-cultist/venv-selector.nvim", "linux-cultist/venv-selector.nvim",
branch = "regexp", -- Use this branch for the new version branch = "regexp", -- Use this branch for the new version
cmd = "VenvSelect", cmd = "VenvSelect",
enabled = function()
return LazyVim.has("telescope.nvim")
end,
opts = { opts = {
settings = { settings = {
options = { options = {
@ -111,6 +115,7 @@ return {
ft = "python", ft = "python",
keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv", ft = "python" } }, keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv", ft = "python" } },
}, },
{ {
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
opts = function(_, opts) opts = function(_, opts)