From 6affd78df740f85b2ed2a5c50704e901c988ca33 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sat, 25 May 2024 13:13:35 +0100 Subject: [PATCH] Cleanup nvim-cmp config callback --- lua/plugins/completions.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/plugins/completions.lua b/lua/plugins/completions.lua index 7b1f491..6106c04 100644 --- a/lua/plugins/completions.lua +++ b/lua/plugins/completions.lua @@ -180,11 +180,12 @@ return { vim.api.nvim_create_autocmd('LspAttach', { pattern = '*', group = augroup, - callback = function(ev) - local opts = { noremap = true, buffer = ev.buf } + callback = function(event) + local opts = { noremap = true, buffer = event.buf } -- Fixit mapping, or close enough, actually any code action - vim.keymap.set('n', 'fi', require('actions-preview').code_actions, opts) + vim.keymap.set('n', 'fi', + require('actions-preview').code_actions, opts) -- Goto mappings local tb = require('telescope.builtin') @@ -212,7 +213,8 @@ return { -- Swtich file using clangd extension -- TODO: limit this to only filetypes supported by clangd - vim.keymap.set('n', 'sf', ':ClangdSwitchSourceHeader', { silent = true }) + vim.keymap.set('n', 'sf', + ':ClangdSwitchSourceHeader', { silent = true }) end })