This commit is contained in:
Niktia Bykov
2024-01-01 15:42:39 +05:00
commit 982f56d950
60 changed files with 5427 additions and 0 deletions

View File

@ -0,0 +1,45 @@
local dap_status_ok, dap = pcall(require, "dap")
if not dap_status_ok then
return
end
local dapui_status_ok, dapui = pcall(require, "dapui")
if not dapui_status_ok then
return
end
dap.adapters.coreclr = {
type = 'executable',
command = '/usr/local/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() .. '/bin/Debug/', 'file')
end,
},
}
vim.keymap.set('n', '<leader>dr', dap.continue)
vim.keymap.set('n', '<leader>dj', dap.step_into)
vim.keymap.set('n', '<leader>dl', dap.step_over)
vim.keymap.set('n', '<leader>dk', dap.step_out)
vim.keymap.set('n', '<leader>db', dap.toggle_breakpoint)
vim.keymap.set('n', '<leader>ds', dap.terminate)
--Autostart ui when debugging
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

View File

@ -0,0 +1,6 @@
local dapui_status_ok, dapui = pcall(require, "dapui")
if not dapui_status_ok then
return
end
dapui.setup()