Document cmd.ConfirmBehavior options (#1503)

This commit is contained in:
Michael Jakl
2023-04-24 06:55:44 +02:00
committed by GitHub
parent 78bb79b18a
commit f55a3e7fe5

View File

@@ -218,6 +218,14 @@ NOTE: `<Cmd>lua require('cmp').complete()<CR>` can be used to call these functio
If you didn't select any item and the option table contains `select = true`,
nvim-cmp will automatically select the first item.
You can control, how the completion item is injected into
the file through the `behavior` option:
`behavior=cmd.ConfirmBehavior.Insert`: inserts the selected item and
moves adjacent text to the right (default).
`bheavior=cmd.ConfirmBehavior.Replace`: replaces adjecent text with
the selected item.
*cmp.event:on* (%EVENT_NAME%, callback)
Subscribe to nvim-cmp's event. Events are listed below.