From e9f901da2b9bd42553241feb5da7abf773b8042e Mon Sep 17 00:00:00 2001 From: Gustavo Date: Thu, 21 Aug 2025 11:06:45 +0200 Subject: [PATCH] fix: changed keybinds to make more sense --- lua/custom/plugins/trouble.lua | 13 +++++++++---- lua/kickstart/plugins/debug.lua | 24 ++++++++++++------------ 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/lua/custom/plugins/trouble.lua b/lua/custom/plugins/trouble.lua index a750f808..cc2c2305 100644 --- a/lua/custom/plugins/trouble.lua +++ b/lua/custom/plugins/trouble.lua @@ -5,14 +5,14 @@ return { opts = {}, -- Use default options keys = { { - 'qx', + 'dt', 'Trouble diagnostics toggle', desc = 'Toggle Diagnostics', }, { - 'qd', + 'db', 'Trouble diagnostics toggle filter.buf=0', - desc = 'Toggle Document Diagnostics', + desc = 'Toggle Buffer Diagnostics', }, { 'qq', @@ -25,7 +25,12 @@ return { desc = 'Toggle Location List', }, { - 'qr', + 'qc', + ':lua vim.fn.setqflist({}, "r")', + desc = 'Clear Quickfix List', + }, + { + 'qR', 'Trouble lsp toggle focus=false win.position=right', desc = 'Toggle LSP References', }, diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index fccec92b..5838d0f7 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -55,14 +55,14 @@ return { desc = 'Debug: Step Out', }, { - 'db', + 'Db', function() require('dap').toggle_breakpoint() end, desc = 'Debug: Toggle Breakpoint', }, { - 'dB', + 'DB', function() require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') end, @@ -121,16 +121,16 @@ return { } -- Change breakpoint icons - -- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' }) - -- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' }) - -- local breakpoint_icons = vim.g.have_nerd_font - -- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' } - -- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' } - -- for type, icon in pairs(breakpoint_icons) do - -- local tp = 'Dap' .. type - -- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak' - -- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl }) - -- end + vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' }) + vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' }) + local breakpoint_icons = vim.g.have_nerd_font + and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' } + or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' } + for type, icon in pairs(breakpoint_icons) do + local tp = 'Dap' .. type + local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak' + vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl }) + end dap.listeners.after.event_initialized['dapui_config'] = dapui.open dap.listeners.before.event_terminated['dapui_config'] = dapui.close