Add cmp.get_entries. Fixes #831
This commit is contained in:
@@ -162,6 +162,9 @@ NOTE: You can call these functions in mapping via `<Cmd>lua require('cmp').compl
|
|||||||
*cmp.visible* ()
|
*cmp.visible* ()
|
||||||
Return the completion menu is visible or not.
|
Return the completion menu is visible or not.
|
||||||
|
|
||||||
|
*cmp.get_entries* ()
|
||||||
|
Return current all entries.
|
||||||
|
|
||||||
*cmp.get_selected_entry* ()
|
*cmp.get_selected_entry* ()
|
||||||
Return current selected entry. (contains preselected)
|
Return current selected entry. (contains preselected)
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,11 @@ cmp.get_active_entry = cmp.sync(function()
|
|||||||
return cmp.core.view:get_active_entry()
|
return cmp.core.view:get_active_entry()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
---Get current all entries
|
||||||
|
cmp.get_entries = cmp.sync(function()
|
||||||
|
return cmp.core.view:get_entries()
|
||||||
|
end)
|
||||||
|
|
||||||
---Close current completion
|
---Close current completion
|
||||||
cmp.close = cmp.sync(function()
|
cmp.close = cmp.sync(function()
|
||||||
if cmp.core.view:visible() then
|
if cmp.core.view:visible() then
|
||||||
|
|||||||
Reference in New Issue
Block a user