diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 284bcb6..c823b97 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -680,8 +680,16 @@ require("lazy").setup({ luasnip.lsp_expand(args.body) end, }, - completion = { completeopt = "menu,menuone,noinsert" }, + sorting = { + priority_weight = 1, + comparators = { + cmp.config.compare.score, + cmp.config.compare.offset, + cmp.config.compare.sort_text, + }, + }, + completion = { completeopt = "menu,menuone,noinsert" }, -- For an understanding of why these mappings were -- chosen, you will need to read `:help ins-completion` -- @@ -703,9 +711,9 @@ require("lazy").setup({ -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines - --[''] = cmp.mapping.confirm { select = true }, - --[''] = cmp.mapping.select_next_item(), - --[''] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.select_prev_item(), -- Manually trigger a completion from nvim-cmp. -- Generally you don't need this, because nvim-cmp will display