fix(python): make venv-selector dap_enabled conditional on nvim-dap-python (#1529)

This commit is contained in:
Iordanis Petkakis
2023-09-30 18:51:47 +03:00
committed by GitHub
parent bd48536335
commit 7821c0e851

View File

@ -61,15 +61,19 @@ return {
{
"linux-cultist/venv-selector.nvim",
cmd = "VenvSelect",
opts = {
name = {
"venv",
".venv",
"env",
".env",
},
dap_enabled = true, -- Ensure that the venv selector affect PythonPath in nvim-dap as well!
},
opts = function(_, opts)
if require("lazyvim.util").has("nvim-dap-python") then
opts.dap_enabled = true
end
return vim.tbl_deep_extend("force", opts, {
name = {
"venv",
".venv",
"env",
".env",
},
})
end,
keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv" } },
},
}