fix(dap): don't mess up DAP adapters provided by nvim-dap-python

* mason-nvim-dap.nvim ships a `Python: Launch file` adapter which does
  the same thing as `Launch file` of nvim-dap-python, providing both
  doesn't make sense and confuses the users.
* mason-nvim-dap.nvim unexpectedly overrides nvim-dap-python's adapters
  and breaks its venv detection. As a result, user programs are always
  executed in mason debugpy venv rather than the activated one.

Fixes #3064
This commit is contained in:
Moeta Yuko 2024-07-22 22:08:18 +08:00
parent 8db2f3af39
commit 87c1b4bcd3

View file

@ -138,4 +138,15 @@ return {
table.insert(opts.auto_brackets, "python") table.insert(opts.auto_brackets, "python")
end, end,
}, },
-- Don't mess up DAP adapters provided by nvim-dap-python
{
"jay-babu/mason-nvim-dap.nvim",
optional = true,
opts = {
handlers = {
python = function() end,
},
},
},
} }