This commit is contained in:
Christoph J. Scherr 2024-07-04 15:51:13 +02:00
parent d86b137eb5
commit 7ba8b0a752
1 changed files with 103 additions and 6 deletions

View File

@ -359,9 +359,36 @@ return {
{
'mfussenegger/nvim-dap',
lazy = false,
init = function()
require('core.utils').load_mappings 'debug'
end,
keys = {
{
'<leader>db',
function()
require('dap').toggle_breakpoint()
end,
desc = 'Set [D]ebug [B]reakpoint',
},
{
'<leader>dc',
function()
require('dap').continue()
end,
desc = '[D]ebug [C]ontinue',
},
{
'<leader>ds',
function()
require('dap').step_over()
end,
desc = 'Set [D]ebug [S]tep over',
},
{
'<leader>di',
function()
require('dap').step_into()
end,
desc = 'Set [D]ebug step [I]nto',
},
},
config = function()
local dap = require 'dap'
local mason_registry = require 'mason-registry'
@ -408,9 +435,79 @@ return {
},
{
'rcarriga/nvim-dap-ui',
init = function()
require('core.utils').load_mappings 'debug'
end,
keys = {
{
'<leader>du',
function()
require('dapui').toggle()
end,
desc = 'Open [D]ebug [U]i',
},
{
'<leader>dK',
function()
require('dap.ui.widgets').hover()
end,
desc = 'Open [D]ebug [K] hover',
},
{
'<leader>du',
function()
require('dapui').toggle()
end,
desc = 'Open [D]ebug [U]i',
},
{
'<leader>dws',
function()
local widgets = require 'dap.ui.widgets'
local my_sidebar = widgets.sidebar(widgets.scopes)
my_sidebar.open()
end,
desc = 'Open [D]ebug [W]indow [S]copes',
},
{
'<leader>dwf',
function()
local widgets = require 'dap.ui.widgets'
local my_sidebar = widgets.sidebar(widgets.frames)
my_sidebar.open()
end,
desc = 'Open [D]ebug [W]indow [F]rames',
},
{
'<leader>dwi',
function()
local widgets = require 'dap.ui.widgets'
local my_sidebar = widgets.sidebar(widgets.sessions)
my_sidebar.open()
end,
desc = 'Open [D]ebug [W]indow sess[I]ons',
},
{
'<leader>dwt',
function()
local widgets = require 'dap.ui.widgets'
local my_sidebar = widgets.sidebar(widgets.threads)
my_sidebar.open()
end,
desc = 'Open [D]ebug [W]indow [T]hreads',
},
{
'<leader>dwe',
function()
local widgets = require 'dap.ui.widgets'
local my_sidebar = widgets.sidebar(widgets.expression)
my_sidebar.open()
end,
desc = 'Open [D]ebug [W]indow [E]xpression',
},
},
dependencies = {
'mfussenegger/nvim-dap',
'nvim-neotest/nvim-nio',