diff --git a/doc/cmp.txt b/doc/cmp.txt index 00c1d3e..bfd7f37 100644 --- a/doc/cmp.txt +++ b/doc/cmp.txt @@ -172,9 +172,31 @@ NOTE: `lua require('cmp').complete()` can be used to call these functio *cmp.select_next_item* (option: { behavior = cmp.SelectBehavior, count = 1 }) Select the next item. Set count with large number to select pagedown. + `behavior` can be one of: + - `cmp.SelectBehavior.Insert`: Inserts the text at cursor. + - `cmp.SelectBehavior.Select`: Only selects the text, potentially adds ghost_text at + cursor. +>lua + cmp.setup { + mapping = { + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), + } + } +< *cmp.select_prev_item* (option: { behavior = cmp.SelectBehavior, count = 1 }) Select the previous item. Set count with large number to select pageup. + `behavior` can be one of: + - `cmp.SelectBehavior.Insert`: Inserts the text at cursor. + - `cmp.SelectBehavior.Select`: Only selects the text, potentially adds ghost_text at + cursor. +>lua + cmp.setup { + mapping = { + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), + } + } +< *cmp.scroll_docs* (delta: number) Scroll the documentation window if visible.