feat(omnisharp): add nvim-dap configuration

This commit is contained in:
Vo Quang Chien 2024-02-09 19:59:04 +07:00
parent a50f92f755
commit 61aa6fb339

View file

@ -65,4 +65,33 @@ return {
}, },
}, },
}, },
{
"mfussenegger/nvim-dap",
opts = function()
local dap = require("dap")
if not dap.adapters["netcoredbg"] then
require("dap").adapters["netcoredbg"] = {
type = "executable",
command = require("mason-registry").get_package("netcoredbg"):get_install_path() .. "/netcoredbg",
args = { "--interpreter=vscode" },
}
end
for _, lang in ipairs({ "cs", "fsharp", "vb" }) do
if not dap.configurations[lang] then
dap.configurations[lang] = {
{
type = "netcoredbg",
name = "Launch file",
request = "launch",
---@diagnostic disable-next-line: redundant-parameter
program = function()
return vim.fn.input("Path to dll: ", vim.fn.getcwd() .. "/", "file")
end,
cwd = "${workspaceFolder}",
},
}
end
end
end,
},
} }