local dap_status_ok, dap = pcall(require, "dap") if not dap_status_ok then return end -- .NET dap.adapters.coreclr = { type = 'executable', command = '/home/cuqmbr/.local/bin/netcoredbg/netcoredbg', args = {'--interpreter=vscode'} } dap.configurations.cs = { { type = "coreclr", name = "launch - netcoredbg", request = "launch", program = function() return vim.fn.input('Path to dll', vim.fn.getcwd(), 'file') end, }, } -- DapUI local dapui_status_ok, dapui = pcall(require, "dapui") if not dapui_status_ok then return end dapui.setup() dap.listeners.after.event_initialized["dapui_config"] = function() dapui.open() end dap.listeners.before.event_terminated["dapui_config"] = function() dapui.close() end dap.listeners.before.event_exited["dapui_config"] = function() dapui.close() end -- Keymaps vim.keymap.set("n", "", ":lua require('dap').continue()") vim.keymap.set("n", "", ":lua require('dap').step_over()") vim.keymap.set("n", "", ":lua require('dap').step_into()") vim.keymap.set("n", "", ":lua require('dap').step_out()") vim.keymap.set("n", "db", ":lua require('dap').toggle_breakpoint()") vim.keymap.set("n", "dB", ":lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))") vim.keymap.set("n", "lp", ":lua require('dap').set_breakpoint(nil, nil, vim.fn.input('Log point message: '))") vim.keymap.set("n", "dr", ":lua require('dap').repl.open()") vim.keymap.set("n", "dl", ":lua require('dap').run_last()")