chore: run formatting (#1295)
Co-authored-by: stnley <michael@stnley.io>
This commit is contained in:
@@ -125,7 +125,7 @@ core.on_keymap = function(self, keys, fallback)
|
|||||||
}, function()
|
}, function()
|
||||||
local ctx = self:get_context()
|
local ctx = self:get_context()
|
||||||
local word = e:get_word()
|
local word = e:get_word()
|
||||||
if string.sub(ctx.cursor_before_line, - #word, ctx.cursor.col - 1) == word and is_printable then
|
if string.sub(ctx.cursor_before_line, -#word, ctx.cursor.col - 1) == word and is_printable then
|
||||||
fallback()
|
fallback()
|
||||||
else
|
else
|
||||||
self:reset()
|
self:reset()
|
||||||
@@ -417,8 +417,7 @@ core.confirm = function(self, e, option, callback)
|
|||||||
local completion_item = misc.copy(e:get_completion_item())
|
local completion_item = misc.copy(e:get_completion_item())
|
||||||
if not misc.safe(completion_item.textEdit) then
|
if not misc.safe(completion_item.textEdit) then
|
||||||
completion_item.textEdit = {}
|
completion_item.textEdit = {}
|
||||||
completion_item.textEdit.newText = misc.safe(completion_item.insertText) or completion_item.word or
|
completion_item.textEdit.newText = misc.safe(completion_item.insertText) or completion_item.word or completion_item.label
|
||||||
completion_item.label
|
|
||||||
end
|
end
|
||||||
local behavior = option.behavior or config.get().confirmation.default_behavior
|
local behavior = option.behavior or config.get().confirmation.default_behavior
|
||||||
if behavior == types.cmp.ConfirmBehavior.Replace then
|
if behavior == types.cmp.ConfirmBehavior.Replace then
|
||||||
|
|||||||
Reference in New Issue
Block a user