cmp sorting woot
This commit is contained in:
@ -3,4 +3,4 @@ set nowrap
|
|||||||
set tabstop=4
|
set tabstop=4
|
||||||
set softtabstop=4
|
set softtabstop=4
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
set expandtab
|
set noexpandtab
|
||||||
|
@ -6,3 +6,4 @@ createApkDescriptor
|
|||||||
setInstance
|
setInstance
|
||||||
collsion_body
|
collsion_body
|
||||||
shake_decay
|
shake_decay
|
||||||
|
index
|
||||||
|
Binary file not shown.
@ -88,29 +88,31 @@ return {
|
|||||||
cmp.setup({
|
cmp.setup({
|
||||||
preselect = cmp.PreselectMode.None,
|
preselect = cmp.PreselectMode.None,
|
||||||
sources = cmp.config.sources(require("utils").TableConcat({
|
sources = cmp.config.sources(require("utils").TableConcat({
|
||||||
|
{ name = "luasnip", priority = 8 },
|
||||||
|
{ name = "nvim_lsp", priority = 7 },
|
||||||
{ name = "async_path" },
|
{ name = "async_path" },
|
||||||
|
{ name = "treesitter" },
|
||||||
|
{ name = "buffer" },
|
||||||
{ name = "calc" },
|
{ name = "calc" },
|
||||||
{ name = "crates" },
|
{ name = "crates" },
|
||||||
{ name = "emoji" },
|
{ name = "emoji" },
|
||||||
{ name = "luasnip", priority = 8 },
|
|
||||||
{ name = "nvim_lsp", priority = 7 },
|
|
||||||
{ name = "spell" },
|
|
||||||
{ name = "treesitter" },
|
|
||||||
{ name = "buffer" },
|
|
||||||
}, conditionalSources)),
|
}, conditionalSources)),
|
||||||
|
|
||||||
sorting = {
|
sorting = {
|
||||||
comparators = {
|
comparators = {
|
||||||
|
-- compare.score_offset, -- not good at all
|
||||||
|
compare.locality,
|
||||||
|
compare.recently_used,
|
||||||
compare.score, -- based on : score = score + ((#sources - (source_index - 1)) * sorting.priority_weight)
|
compare.score, -- based on : score = score + ((#sources - (source_index - 1)) * sorting.priority_weight)
|
||||||
compare.offset,
|
compare.offset,
|
||||||
--compare.order,
|
compare.order,
|
||||||
--compare.sort_text,
|
-- compare.scopes, -- what?
|
||||||
|
-- compare.sort_text,
|
||||||
-- compare.exact,
|
-- compare.exact,
|
||||||
-- compare.kind,
|
-- compare.kind,
|
||||||
-- compare.length,
|
-- compare.length, -- useless
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
formatting = {
|
formatting = {
|
||||||
format = lspkind.cmp_format({
|
format = lspkind.cmp_format({
|
||||||
menu = {
|
menu = {
|
||||||
|
@ -13,6 +13,7 @@ return {
|
|||||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
|
|
||||||
|
indent = { enable = true },
|
||||||
-- List of parsers to ignore installing (or "all")
|
-- List of parsers to ignore installing (or "all")
|
||||||
-- ignore_install = { "" },
|
-- ignore_install = { "" },
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user