Add reason to complete function (#529)

fix #528
This commit is contained in:
Lukas Reineke
2021-11-17 01:17:58 +09:00
committed by GitHub
parent 4d800fbcab
commit 17d57f96cc
3 changed files with 14 additions and 6 deletions

View File

@@ -13,9 +13,10 @@ mapping = setmetatable({}, {
})
---Invoke completion
mapping.complete = function()
---@param option cmp.ContextOption
mapping.complete = function(option)
return function(fallback)
if not require('cmp').complete() then
if not require('cmp').complete(option) then
fallback()
end
end