first try fixing sorting in cmp
This commit is contained in:
parent
4c3fce3ba2
commit
fa5c5f32a4
@ -70,11 +70,11 @@ cmp.setup({
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'nvim_lsp_signature_help' },
|
||||
{ name = 'treesitter' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'luasnip', priority = 8 },
|
||||
{ name = 'nvim_lsp', priority = 7},
|
||||
{ name = 'nvim_lsp_signature_help', priority = 7 },
|
||||
{ name = 'treesitter', priority = 6 },
|
||||
{ name = 'buffer', priority = 5 },
|
||||
-- { name = 'nvim_lua' },
|
||||
-- { name = 'look' },
|
||||
-- { name = 'path' },
|
||||
@ -90,14 +90,16 @@ cmp.setup({
|
||||
completion = { completeopt = 'menu,menuone,noinsert, noselect' },
|
||||
sorting = {
|
||||
comparators = {
|
||||
cmp.config.compare.offset,
|
||||
cmp.config.compare.exact,
|
||||
require('clangd_extensions.cmp_scores'),
|
||||
cmp.config.compare.recently_used,
|
||||
cmp.config.compare.kind,
|
||||
cmp.config.compare.sort_text,
|
||||
cmp.config.compare.length,
|
||||
cmp.config.compare.order,
|
||||
cmp.config.compare.locality,
|
||||
-- cmp.config.compare.recently_used,
|
||||
-- -- cmp.config.compare.offset,
|
||||
-- cmp.config.compare.exact,
|
||||
-- cmp.config.compare.recently_used,
|
||||
-- cmp.config.compare.kind,
|
||||
-- cmp.config.compare.sort_text,
|
||||
-- cmp.config.compare.length,
|
||||
-- cmp.config.compare.order,
|
||||
},
|
||||
},
|
||||
-- experimental = { native_menu = true }
|
||||
|
Loading…
x
Reference in New Issue
Block a user