diff options
author | Raymaekers Luca <luca@spacehb.net> | 2025-04-05 15:36:24 +0200 |
---|---|---|
committer | Raymaekers Luca <luca@spacehb.net> | 2025-04-05 15:36:24 +0200 |
commit | ddad9ca6370c97991679bcfd91704e8548bb973a (patch) | |
tree | 09ebbb33f9a65be421890d4964f567676cf21967 /after/plugin/dap.lua | |
parent | 7870db20ff0594474daf7cab957cd936d4c246c7 (diff) | |
parent | 2c433c348662ee6e4ee5c99a8f5e400858013fa2 (diff) |
Merge branch 'fast'
Diffstat (limited to 'after/plugin/dap.lua')
-rw-r--r-- | after/plugin/dap.lua | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/after/plugin/dap.lua b/after/plugin/dap.lua deleted file mode 100644 index fd141bb..0000000 --- a/after/plugin/dap.lua +++ /dev/null @@ -1,75 +0,0 @@ -local dap = require("dap") -local dapui = require("dapui") -local widgets = require("dap.ui.widgets") -local map = vim.keymap.set - -dapui.setup() --- stylua: ignore start -map("n", " bu", function() dapui.toggle() end, { desc = "Toggle dap-ui" }) -map("n", " bb", function() dap.toggle_breakpoint() end, { desc = "Toggle breakpoint" }) -map("n", " bc", function() dap.continue() end, {desc="Continue"}) -map("n", " bs", function() dap.step_over() end, {desc="Step over"}) -map("n", " bi", function() dap.step_into() end, {desc="Step into"}) -map("n", " bo", function() dap.step_out() end, {desc="Step out"}) -map({ "n", "v" }, " bh", function() widgets.hover() end, {desc="Show hover"}) -map({ "n", "v" }, " bv", function() widgets.preview() end, {desc="Show preview"}) -map("n", " bf", function() widgets.centered_float(widgets.frames) end, {desc="Show frames"}) -map("n", " bp", function() widgets.centered_float(widgets.scopes) end, {desc="Show scopes"}) --- stylua: ignore end -map("n", " bl", function() - dap.set_breakpoint(nil, nil, vim.fn.input("Log point message: ")) -end, { desc = "Break point with log" }) - -dap.adapters.gdb = { - id = "gdb", - type = "executable", - command = "gdb", - args = { "--quiet", "--interpreter=dap" }, -} - -dap.configurations.c = { - { - name = "Run (GDB)", - type = "gdb", - request = "launch", - -- This requires special handling of 'run_last', see - -- https://github.com/mfussenegger/nvim-dap/issues/1025#issuecomment-1695852355 - program = function() - local path = vim.fn.input({ - prompt = "Path to executable: ", - default = vim.fn.getcwd() .. "/", - completion = "file", - }) - - return (path and path ~= "") and path or dap.ABORT - end, - }, - { - name = "Run with arguments (GDB)", - type = "gdb", - request = "launch", - -- This requires special handling of 'run_last', see - -- https://github.com/mfussenegger/nvim-dap/issues/1025#issuecomment-1695852355 - program = function() - local path = vim.fn.input({ - prompt = "Path to executable: ", - default = vim.fn.getcwd() .. "/", - completion = "file", - }) - - return (path and path ~= "") and path or dap.ABORT - end, - args = function() - local args_str = vim.fn.input({ - prompt = "Arguments: ", - }) - return vim.split(args_str, " +") - end, - }, - { - name = "Attach to process (GDB)", - type = "gdb", - request = "attach", - processId = require("dap.utils").pick_process, - }, -} |