Add cmp.mapping.abort

This commit is contained in:
hrsh7th
2021-08-25 17:14:32 +09:00
parent 61eb3e0f10
commit 79601cb3db
3 changed files with 22 additions and 0 deletions

View File

@@ -28,6 +28,15 @@ mapping.close = function()
end
end
---Abort current completion menu if it displayed.
mapping.abort = function()
return function(fallback)
if not require('cmp').abort() then
fallback()
end
end
end
---Scroll documentation window.
mapping.scroll_docs = function(delta)
return function(fallback)