From a20229a39ebea62fa40ced9762162554c79b06fd Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 28 Sep 2023 15:28:22 +0200 Subject: added dap en dap-ui configuration --- config/essentials/nvim/after/plugin/dap.lua | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 config/essentials/nvim/after/plugin/dap.lua (limited to 'config/essentials/nvim/after/plugin/dap.lua') diff --git a/config/essentials/nvim/after/plugin/dap.lua b/config/essentials/nvim/after/plugin/dap.lua new file mode 100644 index 0000000..8c0a739 --- /dev/null +++ b/config/essentials/nvim/after/plugin/dap.lua @@ -0,0 +1,39 @@ +local dap = require('dap') + +dap.adapters.coreclr = { + type = 'executable', + command = '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, + }, +} + +local function nnoremap(rhs, lhs, bufopts, desc) + bufopts.desc = desc + vim.keymap.set("n", rhs, lhs, bufopts) +end +local bufopts = { noremap=true, silent=true } + + +nnoremap('' , dap.continue, bufopts, "Continue") +nnoremap('' , dap.step_over, bufopts, "Step over") +nnoremap('' , dap.step_into, bufopts, "Step into") +nnoremap('' , dap.step_out, bufopts, "Step out") +nnoremap('b' , dap.toggle_breakpoint, bufopts, "Toggle breakpoint") + +nnoremap('B' , function() dap.set_breakpoint(vim.fn.input('Breakpoint condition: ')) + end, bufopts, "Set breakpoint") +nnoremap('lp' , function() dap.set_breakpoint(nil, nil, vim.fn.input('Log point message: ')) + end, bufopts, "set breakpoint with log point message") + +nnoremap('dr' , dap.repl.open, bufopts, "Reply open") +nnoremap('dl' , dap.run_last, bufopts, "Run las") -- cgit v1.2.3 From bdfb02015178aabdb80320e9355fb33517c7f240 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 4 Oct 2023 02:55:09 +0200 Subject: added dap disconnect remap --- config/essentials/nvim/after/plugin/dap.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'config/essentials/nvim/after/plugin/dap.lua') diff --git a/config/essentials/nvim/after/plugin/dap.lua b/config/essentials/nvim/after/plugin/dap.lua index 8c0a739..e32b5ee 100644 --- a/config/essentials/nvim/after/plugin/dap.lua +++ b/config/essentials/nvim/after/plugin/dap.lua @@ -25,6 +25,7 @@ local bufopts = { noremap=true, silent=true } nnoremap('' , dap.continue, bufopts, "Continue") +nnoremap('' , dap.disconnect, bufopts, "Continue") nnoremap('' , dap.step_over, bufopts, "Step over") nnoremap('' , dap.step_into, bufopts, "Step into") nnoremap('' , dap.step_out, bufopts, "Step out") -- cgit v1.2.3