This commit is contained in:
Your Name 2026-03-07 07:04:51 +08:00
parent 6aa85cc985
commit 7d410f88e6
1 changed files with 27 additions and 0 deletions

View File

@ -25,6 +25,33 @@ return {
-- Add your own debuggers here -- Add your own debuggers here
'leoluz/nvim-dap-go', 'leoluz/nvim-dap-go',
-- Virtual text support for nvim-dap
{
'theHamsta/nvim-dap-virtual-text',
opts = {
enabled = true,
enabled_commands = true,
highlight_changed_variables = true,
highlight_new_as_changed = false,
show_stop_reason = true,
commented = false,
only_first_definition = true,
all_references = false,
clear_on_continue = false,
display_callback = function(variable, buf, stackframe, node, options)
if options.virt_text_pos == 'inline' then
return ' = ' .. variable.value:gsub("%s+", " ")
else
return variable.name .. ' = ' .. variable.value:gsub("%s+", " ")
end
end,
virt_text_pos = vim.fn.has 'nvim-0.10' == 1 and 'inline' or 'eol',
all_frames = false,
virt_lines = false,
virt_text_win_col = nil
},
},
}, },
keys = { keys = {
-- Basic debugging keymaps, feel free to change to your liking! -- Basic debugging keymaps, feel free to change to your liking!