mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-21 20:11:06 +00:00
fix(python): make venv-selector dap_enabled conditional on nvim-dap-python (#1529)
This commit is contained in:
parent
bd48536335
commit
7821c0e851
1 changed files with 13 additions and 9 deletions
|
|
@ -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" } },
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue