mirror of
https://github.com/hrsh7th/nvim-cmp
synced 2024-09-16 20:54:03 +02:00
docs: update and fix view
documentation (#1868)
- correct view.follow_cursor to view.entries.follow_cursor - mention that view.entries.follow_cursor is custom view only - add missing view.entries.selection_order option - mention the docs class in list of classes nested under view class
This commit is contained in:
parent
b9fd19fa16
commit
2fb2a3cf78
1 changed files with 15 additions and 5 deletions
20
doc/cmp.txt
20
doc/cmp.txt
|
@ -257,7 +257,7 @@ NOTE: `<Cmd>lua require('cmp').complete()<CR>` can be used to call these functio
|
||||||
`behavior=cmp.ConfirmBehavior.Insert`: inserts the selected item and
|
`behavior=cmp.ConfirmBehavior.Insert`: inserts the selected item and
|
||||||
moves adjacent text to the right (default).
|
moves adjacent text to the right (default).
|
||||||
`behavior=cmp.ConfirmBehavior.Replace`: replaces adjacent text with
|
`behavior=cmp.ConfirmBehavior.Replace`: replaces adjacent text with
|
||||||
the selected item.
|
the selected item.
|
||||||
>lua
|
>lua
|
||||||
cmp.setup {
|
cmp.setup {
|
||||||
mapping = {
|
mapping = {
|
||||||
|
@ -676,7 +676,8 @@ sources[n].entry_filter~
|
||||||
|
|
||||||
*cmp-config.view*
|
*cmp-config.view*
|
||||||
view~
|
view~
|
||||||
`{ entries: cmp.EntriesConfig|string }`
|
`{ docs: cmp.DocsViewConfig }`
|
||||||
|
`{ entries: cmp.EntriesViewConfig|string }`
|
||||||
The view class used to customize nvim-cmp's appearance.
|
The view class used to customize nvim-cmp's appearance.
|
||||||
Currently available configuration options are:
|
Currently available configuration options are:
|
||||||
|
|
||||||
|
@ -686,12 +687,21 @@ view.docs.auto_open~
|
||||||
|
|
||||||
Specify whether to show the docs_view when selecting an item.
|
Specify whether to show the docs_view when selecting an item.
|
||||||
|
|
||||||
*cmp-config.view.follow_cursor*
|
*cmp-config.view.entries.selection_order*
|
||||||
view.follow_cursor*
|
view.entries.selection_order~
|
||||||
|
`string`
|
||||||
|
|
||||||
|
Specify whether to select the option in the pmenu that is at
|
||||||
|
the top (`top_down`) or nearest to the cursor (`near_cursor`).
|
||||||
|
Useful if pmenu is above cursor and you want to change default
|
||||||
|
selection direction. Custom view only. `top_down` by default.
|
||||||
|
|
||||||
|
*cmp-config.view.entries.follow_cursor*
|
||||||
|
view.entries.follow_cursor~
|
||||||
`boolean`
|
`boolean`
|
||||||
|
|
||||||
Specify whether the pmenu should follow the current position of the cursor
|
Specify whether the pmenu should follow the current position of the cursor
|
||||||
as the user types. `false` by default.
|
as the user types. Custom view only. `false` by default.
|
||||||
|
|
||||||
*cmp-config.window.{completion,documentation}.border*
|
*cmp-config.window.{completion,documentation}.border*
|
||||||
window.{completion,documentation}.border~
|
window.{completion,documentation}.border~
|
||||||
|
|
Loading…
Reference in a new issue