diff --git a/lua/lazyvim/plugins/extras/lang/omnisharp.lua b/lua/lazyvim/plugins/extras/lang/omnisharp.lua index 31162e0c..d11cbb6d 100644 --- a/lua/lazyvim/plugins/extras/lang/omnisharp.lua +++ b/lua/lazyvim/plugins/extras/lang/omnisharp.lua @@ -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, + }, }