diff options
author | Gabriel A. Giovanini <g.giovanini@gridx.de> | 2024-08-16 09:37:25 +0200 |
---|---|---|
committer | Gabriel A. Giovanini <g.giovanini@gridx.de> | 2024-08-16 09:37:25 +0200 |
commit | dfe730b889915e33af1d3da810b13aa9d1d4253c (patch) | |
tree | 9dd8b2167c57271525b360125d5123a81813413a /lua/gabrielgio/dap.lua | |
parent | 1ad342d73e7e8df5235c699a18c87fc4c9fc4b03 (diff) | |
download | gabrielgio.lua-dfe730b889915e33af1d3da810b13aa9d1d4253c.tar.gz gabrielgio.lua-dfe730b889915e33af1d3da810b13aa9d1d4253c.tar.bz2 gabrielgio.lua-dfe730b889915e33af1d3da810b13aa9d1d4253c.zip |
feat: Sync
Diffstat (limited to 'lua/gabrielgio/dap.lua')
-rw-r--r-- | lua/gabrielgio/dap.lua | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/lua/gabrielgio/dap.lua b/lua/gabrielgio/dap.lua index 2534c7a..238a1bc 100644 --- a/lua/gabrielgio/dap.lua +++ b/lua/gabrielgio/dap.lua @@ -1,8 +1,5 @@ local dap = require("dap") local key = require("gabrielgio.key") -local dapgo = require("dap-go") - -dapgo.setup({delve = {build_flags = "-tags=unit,integration,e2e"}}) key.nnoremap("<F5>", ":lua require'dap'.continue()<CR>") key.nnoremap("<F10>", ":lua require'dap'.step_over()<CR>") @@ -10,23 +7,23 @@ key.nnoremap("<F11>", ":lua require'dap'.step_into()<CR>") key.nnoremap("<F12>", ":lua require'dap'.step_out()<CR>") key.nnoremap("<leader>b", ":lua require'dap'.toggle_breakpoint()<CR>") key.nnoremap("<leader>B", ":lua require'dap'.set_breakpoint(vim.fn.input('Condition: '))<CR>") -key.nnoremap("<leader>dt", ":lua require'dap-go'.debug_test()<CR>") key.nnoremap("<leader>dr", ":lua require'dap'.repl.open()<CR>") -dap.adapters.gdb = { - type = "executable", - command = "gdb", - args = { "-i", "dap" } -} +dap.adapters.delve = { + type = "server", + host = "127.0.0.1", + port = 2345, + } -dap.configurations.c = { +dap.configurations.go = { { - name = "Launch", - type = "gdb", - request = "launch", - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - cwd = "${workspaceFolder}", + type = "delve", + name = "remote", + mode = "remote", + request = "attach", + connect = { + host = "127.0.0.1", + port = "2345", + }, }, } |