-- auto completion
{
"hrsh7th/nvim-cmp",
+ version = false, -- last release is way too old
+ event = "InsertEnter",
+ dependencies = {
+ "hrsh7th/cmp-nvim-lsp",
+ "hrsh7th/cmp-buffer",
+ "hrsh7th/cmp-path",
+ "saadparwaiz1/cmp_luasnip",
+ },
---@param opts cmp.ConfigSchema
opts = function(_, opts)
local has_words_before = function()
completeopt = "menu,menuone,noselect",
})
-- TODO: review if I want to keep any of LazyVim's mappings
- opts.mapping = cmp.mapping.preset.insert({
+ opts.mapping = {
-- lazyvims
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
fallback()
end
end, { "i", "s" }),
- })
+ }
end,
},