mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-26 14:12:23 +00:00
Fix nvim-cmp sorter
This commit is contained in:
parent
a7b6ba71df
commit
4abaf5a870
1 changed files with 5 additions and 4 deletions
|
@ -23,7 +23,7 @@
|
||||||
:<esc> #(do (cmp.mapping.close) (vim.cmd "stopinsert"))
|
:<esc> #(do (cmp.mapping.close) (vim.cmd "stopinsert"))
|
||||||
:<CR> (cmp.mapping.confirm {:select true})}
|
:<CR> (cmp.mapping.confirm {:select true})}
|
||||||
|
|
||||||
;:experimental {:custom_menu true}
|
:experimental {:custom_menu true}
|
||||||
|
|
||||||
:sources [{:name "nvim_lsp" :priority 5}
|
:sources [{:name "nvim_lsp" :priority 5}
|
||||||
{:name "vsnip" :priority 3}
|
{:name "vsnip" :priority 3}
|
||||||
|
@ -35,9 +35,10 @@
|
||||||
|
|
||||||
:formatting {:format item-formatter}
|
:formatting {:format item-formatter}
|
||||||
|
|
||||||
:sorting {:comparators [#(do
|
:sorting {:comparators [#(do (if (and (= 15 ($1:get_kind)) (= 15 ($2:get_kind))) nil
|
||||||
;(print ($1:get_kind) $1.completion_item.label "--" ($2:get_kind) $2.completion_item.label)
|
(= 15 ($1:get_kind)) false
|
||||||
(if (= 15 ($1:get_kind)) false nil)) ; 15 means "SNIPPET", see https://github.com/hrsh7th/nvim-cmp/blob/main/lua/cmp/types/lsp.lua
|
(= 15 ($2:get_kind)) true
|
||||||
|
nil)) ; 15 means "SNIPPET", see https://github.com/hrsh7th/nvim-cmp/blob/main/lua/cmp/types/lsp.lua
|
||||||
cmp.config.compare.offset
|
cmp.config.compare.offset
|
||||||
cmp.config.compare.exact
|
cmp.config.compare.exact
|
||||||
cmp.config.compare.score
|
cmp.config.compare.score
|
||||||
|
|
Loading…
Reference in a new issue