astronvim/plugins/mason-nvim-dap.lua

32 lines
842 B
Lua
Raw Normal View History

2023-02-03 16:08:09 +01:00
return {
"jay-babu/mason-nvim-dap.nvim",
config = function(self, opts)
self.default_config(opts) -- run default AstroNvim mason-nvim-dap config function
-- do more configuration as needed
local mason_nvim_dap = require "mason-nvim-dap"
mason_nvim_dap.setup_handlers {
python = function(source_name)
local dap = require "dap"
dap.adapters.python = {
type = "executable",
command = "/usr/bin/python3",
args = {
"-m",
"debugpy.adapter",
},
}
dap.configurations.python = {
{
type = "python",
request = "launch",
name = "Launch file",
program = "${file}", -- This configuration will launch the current file if used.
},
}
end,
}
end,
}