1
0

FEAT: Adding delve debugger option

FIX: better keymapping Open_Float Diagnostic
This commit is contained in:
Nigel Barink 2024-04-06 22:45:06 +02:00
parent 1248080858
commit b7785d460d
Signed by: Nigel
GPG Key ID: C54278C495538619
2 changed files with 31 additions and 1 deletions

View File

@ -28,7 +28,7 @@ vim.keymap.set('i', '<A-k>', ':m .-2<CR>==gi', {noremap = true})
-- Diagnostics !
vim.keymap.set('n', '<C-T>', function() require('trouble').toggle() end )
vim.keymap.set('n', '<C-D>', function () vim.diagnostic.open_float() end )
vim.keymap.set('n', '<leader>d', function () vim.diagnostic.open_float() end )
vim.keymap.set('n', '<leader>dn', function () vim.diagnostic.goto_next() end )
vim.keymap.set('n', '<leader>dp', function () vim.diagnostic.goto_prev() end )

View File

@ -28,8 +28,38 @@ return {
request = 'launch';
name = "Launch file";
program = "java ${file}";
}}
dap.configurations.go = {
{
type = "delve",
name = "Debug",
request = "launch",
program = "${file}"
},
{
type = "delve",
name = "Debug test", -- configuration for debugging test files
request = "launch",
mode = "test",
program = "${file}"
},
-- works with go.mod packages and sub packages
{
type = "delve",
name = "Debug test (go.mod)",
request = "launch",
mode = "test",
program = "./${relativeFileDirname}"
}
}
dap.adapters.delve = {
type = 'server',
port = '${port}',
executable = {
command = 'dlv',
args = {'dap', '-l', '127.0.0.1:${port}'},
}
}
end
}
}