From 91f219193e541469eb335f2977c9fa2c1eaab2ba Mon Sep 17 00:00:00 2001 From: JackJ30 Date: Wed, 28 May 2025 18:58:17 -0400 Subject: lighter completion --- .config/nvim/lua/user/plugins/cmp.lua | 8 ++++---- .config/nvim/lua/user/plugins/lspconfig.lua | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) (limited to '.config/nvim') diff --git a/.config/nvim/lua/user/plugins/cmp.lua b/.config/nvim/lua/user/plugins/cmp.lua index 56d6958..a7afe9f 100644 --- a/.config/nvim/lua/user/plugins/cmp.lua +++ b/.config/nvim/lua/user/plugins/cmp.lua @@ -18,12 +18,12 @@ return { }, mapping = cmp.mapping.preset.insert(), sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - { name = "luasnip" }, + { name = 'nvim_lsp', max_item_count = 5 }, + { name = "luasnip", max_item_count = 5 }, }, { - { name = 'buffer' }, + { name = 'buffer', max_item_count = 2 }, }, { - { name = 'path' }, + { name = 'path', max_item_count = 2 }, }), sorting = { comparators = { diff --git a/.config/nvim/lua/user/plugins/lspconfig.lua b/.config/nvim/lua/user/plugins/lspconfig.lua index 01b3262..2fcfa9b 100644 --- a/.config/nvim/lua/user/plugins/lspconfig.lua +++ b/.config/nvim/lua/user/plugins/lspconfig.lua @@ -22,6 +22,7 @@ local on_attach = function(client, bufnr) keymap('n', 'wa', vim.lsp.buf.add_workspace_folder, { desc = 'Add workspace folder' }) keymap('n', 'wr', vim.lsp.buf.remove_workspace_folder, { desc = 'Remove workspace folder' }) + keymap('n', 'cf', vim.cmd.ClangdSwitchSourceHeader, { desc = 'Switch source with header' }) keymap( 'n', 'wl', -- cgit v1.2.3