From 5059c745073ecaf115b0894bd708ffb4bd6b4abc Mon Sep 17 00:00:00 2001 From: Matthew Swanson Date: Sun, 2 Feb 2025 01:30:14 -0800 Subject: [PATCH] Add trouble --- lua/custom/plugins/clangd-ext.lua | 62 +++++++++++++++++++++++++++++++ lua/custom/plugins/neo-tree.lua | 1 - 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 lua/custom/plugins/clangd-ext.lua diff --git a/lua/custom/plugins/clangd-ext.lua b/lua/custom/plugins/clangd-ext.lua new file mode 100644 index 00000000..82d87ed5 --- /dev/null +++ b/lua/custom/plugins/clangd-ext.lua @@ -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 = { + { + 'xx', + 'Trouble diagnostics toggle', + desc = 'Diagnostics (Trouble)', + }, + { + 'xX', + 'Trouble diagnostics toggle filter.buf=0', + desc = 'Buffer Diagnostics (Trouble)', + }, + { + 'cs', + 'Trouble symbols toggle focus=false', + desc = 'Symbols (Trouble)', + }, + { + 'cl', + 'Trouble lsp toggle focus=false win.position=right', + desc = 'LSP Definitions / references / ... (Trouble)', + }, + { + 'xL', + 'Trouble loclist toggle', + desc = 'Location List (Trouble)', + }, + { + 'xQ', + 'Trouble qflist toggle', + desc = 'Quickfix List (Trouble)', + }, + }, + }, +} diff --git a/lua/custom/plugins/neo-tree.lua b/lua/custom/plugins/neo-tree.lua index 08d826c8..9fb6eb5d 100644 --- a/lua/custom/plugins/neo-tree.lua +++ b/lua/custom/plugins/neo-tree.lua @@ -39,7 +39,6 @@ return { -- Keymaps vim.keymap.set('n', '', ':Neotree toggle', { silent = true }) - vim.keymap.set('n', 'o', ':Neotree focus', { silent = true }) end, }, }