mirror of
https://gitlab.com/mlunax/dotfiles.git
synced 2025-04-18 00:16:49 +00:00
cmp sorting
This commit is contained in:
parent
e1d2e6d198
commit
64361c386b
1 changed files with 12 additions and 4 deletions
|
@ -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
|
||||
--['<CR>'] = cmp.mapping.confirm { select = true },
|
||||
--['<Tab>'] = cmp.mapping.select_next_item(),
|
||||
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping.select_next_item(),
|
||||
["<S-Tab>"] = cmp.mapping.select_prev_item(),
|
||||
|
||||
-- Manually trigger a completion from nvim-cmp.
|
||||
-- Generally you don't need this, because nvim-cmp will display
|
||||
|
|
Loading…
Add table
Reference in a new issue