mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(python): enable venv-selector w/o telescope
The visual selection of a venv of venv-selector is currently not compatible with fzf-lua. Disabling the plugin as a whole breaks the python extra, since other plugins (dap, lsp) need the venv selection that venv-selector performs heuristically w/o user selection. see: https://github.com/LazyVim/LazyVim/discussions/5081
This commit is contained in:
parent
d0c366e4d8
commit
b1563fc034
1 changed files with 18 additions and 4 deletions
|
|
@ -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 = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv", ft = "python" } },
|
||||
keys = {
|
||||
{
|
||||
"<leader>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",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue