mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 00:49:03 +02:00
feat(cmp): added custom comparator to prioritize AI sources like copilot and codeium
This commit is contained in:
parent
dd55cbdc99
commit
eddd3af351
3 changed files with 22 additions and 3 deletions
|
@ -71,8 +71,7 @@ return {
|
|||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, 1, { name = "copilot", group_index = 1 })
|
||||
opts.sorting = opts.sorting or require("cmp.config.default")().sorting
|
||||
table.insert(opts.sorting.comparators, 1, require("copilot_cmp.comparators").prioritize)
|
||||
table.insert(opts.sorting.primary, "copilot")
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue