fix: cmp duplicate issues
This commit is contained in:
@@ -19,11 +19,10 @@ return {
|
|||||||
},
|
},
|
||||||
sources = {
|
sources = {
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
{ name = "path" },
|
|
||||||
{ name = "nvim_lsp_signature_help" },
|
{ name = "nvim_lsp_signature_help" },
|
||||||
{ name = "nvim_lua" },
|
{ name = "nvim_lua" },
|
||||||
{ name = "luasnip", keyword_length = 2 },
|
|
||||||
{ name = "vim-dadbod-completion" },
|
{ name = "vim-dadbod-completion" },
|
||||||
|
{ name = "luasnip", keyword_length = 2 },
|
||||||
-- { name = "buffer", keyword_length = 3 },
|
-- { name = "buffer", keyword_length = 3 },
|
||||||
},
|
},
|
||||||
view = {
|
view = {
|
||||||
@@ -55,6 +54,13 @@ return {
|
|||||||
kind.menu = "[DB]"
|
kind.menu = "[DB]"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
vim_item.dup = ({
|
||||||
|
vsnip = 0,
|
||||||
|
nvim_lsp = 0,
|
||||||
|
nvim_lua = 0,
|
||||||
|
buffer = 0,
|
||||||
|
})[entry.source.name] or 0
|
||||||
|
|
||||||
return kind
|
return kind
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@@ -78,6 +84,15 @@ return {
|
|||||||
["<Tab>"] = nil,
|
["<Tab>"] = nil,
|
||||||
["<S-Tab>"] = nil,
|
["<S-Tab>"] = nil,
|
||||||
}),
|
}),
|
||||||
|
sorting = {
|
||||||
|
comparators = {
|
||||||
|
cmp.config.compare.offset,
|
||||||
|
cmp.config.compare.exact,
|
||||||
|
cmp.config.compare.score,
|
||||||
|
cmp.config.compare.recently_used,
|
||||||
|
cmp.config.compare.kind,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user