virtual lines fix

This commit is contained in:
Christian Nieves
2022-12-26 15:25:46 -06:00
parent 1740ddafc2
commit f164ec976d
3 changed files with 19 additions and 19 deletions

View File

@ -1,6 +1,6 @@
local use_google = require("utils").use_google
local tprint = require("utils").tprint
local dump = require("utils").dump
-- local tprint = require("utils").tprint
-- local dump = require("utils").dump
local log = require("utils").log
local notify = require 'notify'
@ -349,17 +349,7 @@ cmp.setup({
cmp.config.compare.offset,
cmp.config.compare.exact,
cmp.config.compare.score,
function(entry1, entry2)
local _, entry1_under = entry1.completion_item.label:find("^_+")
local _, entry2_under = entry2.completion_item.label:find("^_+")
entry1_under = entry1_under or 0
entry2_under = entry2_under or 0
if entry1_under > entry2_under then
return false
elseif entry1_under < entry2_under then
return true
end
end,
require "cmp-under-comparator".under,
cmp.config.compare.kind,
cmp.config.compare.sort_text,
cmp.config.compare.length,