fix nvim-cmp autoimports
This commit is contained in:
+10
-6
@@ -410,8 +410,12 @@ require("lazy").setup({
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "nvim_lsp" },
|
{
|
||||||
}, {
|
name = "nvim_lsp",
|
||||||
|
entry_filter = function(entry, ctx)
|
||||||
|
return compare.scopes.scopes_map[entry:get_word()] ~= nil
|
||||||
|
end,
|
||||||
|
},
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
}),
|
}),
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
@@ -430,12 +434,12 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
sorting = {
|
sorting = {
|
||||||
comparators = {
|
comparators = {
|
||||||
-- compare.offset,
|
compare.scopes,
|
||||||
-- compare.exact,
|
compare.exact,
|
||||||
-- compare.scopes,
|
compare.locality, -- number of lines away
|
||||||
|
-- compare.offset, -- order in file (partially)
|
||||||
-- compare.score,
|
-- compare.score,
|
||||||
-- compare.recently_used,
|
-- compare.recently_used,
|
||||||
-- compare.locality,
|
|
||||||
-- compare.kind,
|
-- compare.kind,
|
||||||
-- compare.sort_text,
|
-- compare.sort_text,
|
||||||
-- compare.length,
|
-- compare.length,
|
||||||
|
|||||||
Reference in New Issue
Block a user