Add trouble

This commit is contained in:
Matthew Swanson 2025-02-02 01:30:14 -08:00
parent c50878db1b
commit 5059c74507
2 changed files with 62 additions and 1 deletions

View File

@ -0,0 +1,62 @@
return {
{
'p00f/clangd_extensions.nvim',
lazy = true,
config = function()
require('clangd_extensions').setup {
inlay_hints = {
inline = vim.fn.has 'nvim-0.10' == 1,
-- Only show inlay hints for the current line
only_current_line = false,
-- Event which triggers a refresh of the inlay hints
only_current_line_autocmd = 'CursorHold',
-- Show parameter hints with the inlay hints
show_parameter_hints = true,
-- Show hints at the beginning of the line
show_variable_name = false,
-- Prefix for parameter hints
parameter_hints_prefix = '<- ',
-- Prefix for all the other hints (type, chaining)
other_hints_prefix = '=> ',
},
}
end,
},
{
'folke/trouble.nvim',
opts = {}, -- for default options, refer to the configuration section for custom setup.
cmd = 'Trouble',
keys = {
{
'<leader>xx',
'<cmd>Trouble diagnostics toggle<cr>',
desc = 'Diagnostics (Trouble)',
},
{
'<leader>xX',
'<cmd>Trouble diagnostics toggle filter.buf=0<cr>',
desc = 'Buffer Diagnostics (Trouble)',
},
{
'<leader>cs',
'<cmd>Trouble symbols toggle focus=false<cr>',
desc = 'Symbols (Trouble)',
},
{
'<leader>cl',
'<cmd>Trouble lsp toggle focus=false win.position=right<cr>',
desc = 'LSP Definitions / references / ... (Trouble)',
},
{
'<leader>xL',
'<cmd>Trouble loclist toggle<cr>',
desc = 'Location List (Trouble)',
},
{
'<leader>xQ',
'<cmd>Trouble qflist toggle<cr>',
desc = 'Quickfix List (Trouble)',
},
},
},
}

View File

@ -39,7 +39,6 @@ return {
-- Keymaps
vim.keymap.set('n', '<C-n>', ':Neotree toggle<CR>', { silent = true })
vim.keymap.set('n', '<leader>o', ':Neotree focus<CR>', { silent = true })
end,
},
}