mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 17:58:51 +02: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",
|
"linux-cultist/venv-selector.nvim",
|
||||||
cmd = "VenvSelect",
|
cmd = "VenvSelect",
|
||||||
opts = {
|
opts = function(_, opts)
|
||||||
name = {
|
if require("lazyvim.util").has("nvim-dap-python") then
|
||||||
"venv",
|
opts.dap_enabled = true
|
||||||
".venv",
|
end
|
||||||
"env",
|
return vim.tbl_deep_extend("force", opts, {
|
||||||
".env",
|
name = {
|
||||||
},
|
"venv",
|
||||||
dap_enabled = true, -- Ensure that the venv selector affect PythonPath in nvim-dap as well!
|
".venv",
|
||||||
},
|
"env",
|
||||||
|
".env",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv" } },
|
keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv" } },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue