Cleanup nvim-cmp config callback

This commit is contained in:
Kenneth Benzie 2024-05-25 13:13:35 +01:00
parent fcd5cfbd54
commit 6affd78df7

View File

@ -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', '<leader>fi', require('actions-preview').code_actions, opts)
vim.keymap.set('n', '<leader>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', '<leader>sf', ':ClangdSwitchSourceHeader<CR>', { silent = true })
vim.keymap.set('n', '<leader>sf',
':ClangdSwitchSourceHeader<CR>', { silent = true })
end
})