fix: changed keybinds to make more sense

This commit is contained in:
Gustavo 2025-08-21 11:06:45 +02:00
parent ba163e7629
commit e9f901da2b
2 changed files with 21 additions and 16 deletions

View File

@ -5,14 +5,14 @@ return {
opts = {}, -- Use default options opts = {}, -- Use default options
keys = { keys = {
{ {
'<leader>qx', '<leader>dt',
'<cmd>Trouble diagnostics toggle<cr>', '<cmd>Trouble diagnostics toggle<cr>',
desc = 'Toggle Diagnostics', desc = 'Toggle Diagnostics',
}, },
{ {
'<leader>qd', '<leader>db',
'<cmd>Trouble diagnostics toggle filter.buf=0<cr>', '<cmd>Trouble diagnostics toggle filter.buf=0<cr>',
desc = 'Toggle Document Diagnostics', desc = 'Toggle Buffer Diagnostics',
}, },
{ {
'<leader>qq', '<leader>qq',
@ -25,7 +25,12 @@ return {
desc = 'Toggle Location List', desc = 'Toggle Location List',
}, },
{ {
'<leader>qr', '<leader>qc',
'<cmd>:lua vim.fn.setqflist({}, "r")<cr>',
desc = 'Clear Quickfix List',
},
{
'<leader>qR',
'<cmd>Trouble lsp toggle focus=false win.position=right<cr>', '<cmd>Trouble lsp toggle focus=false win.position=right<cr>',
desc = 'Toggle LSP References', desc = 'Toggle LSP References',
}, },

View File

@ -55,14 +55,14 @@ return {
desc = 'Debug: Step Out', desc = 'Debug: Step Out',
}, },
{ {
'<leader>db', '<leader>Db',
function() function()
require('dap').toggle_breakpoint() require('dap').toggle_breakpoint()
end, end,
desc = 'Debug: Toggle Breakpoint', desc = 'Debug: Toggle Breakpoint',
}, },
{ {
'<leader>dB', '<leader>DB',
function() function()
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ')
end, end,
@ -121,16 +121,16 @@ return {
} }
-- Change breakpoint icons -- Change breakpoint icons
-- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' }) vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
-- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' }) vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
-- local breakpoint_icons = vim.g.have_nerd_font local breakpoint_icons = vim.g.have_nerd_font
-- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' } and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
-- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' } or { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
-- for type, icon in pairs(breakpoint_icons) do for type, icon in pairs(breakpoint_icons) do
-- local tp = 'Dap' .. type local tp = 'Dap' .. type
-- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak' local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
-- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl }) vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
-- end end
dap.listeners.after.event_initialized['dapui_config'] = dapui.open dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['dapui_config'] = dapui.close dap.listeners.before.event_terminated['dapui_config'] = dapui.close