mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-25 18:28:50 +02:00
feat(omnisharp): add nvim-dap
configuration (#2532)
* feat(omnisharp): add `nvim-dap` configuration * chore(omnisharp): add `netcoredbg` to `ensure_installed` * chore: simplify get `netcoredbg` path
This commit is contained in:
parent
de01a37cb6
commit
f23d3cee42
1 changed files with 33 additions and 2 deletions
|
@ -35,8 +35,9 @@ return {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
opts.ensure_installed = opts.ensure_installed or {}
|
if type(opts.ensure_installed) == "table" then
|
||||||
table.insert(opts.ensure_installed, "csharpier")
|
vim.list_extend(opts.ensure_installed, { "netcoredbg", "csharpier" })
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -65,4 +66,34 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
optional = true,
|
||||||
|
opts = function()
|
||||||
|
local dap = require("dap")
|
||||||
|
if not dap.adapters["netcoredbg"] then
|
||||||
|
require("dap").adapters["netcoredbg"] = {
|
||||||
|
type = "executable",
|
||||||
|
command = vim.fn.exepath("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,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue