diff --git a/docs/configuration/completion.md b/docs/configuration/completion.md index 8e05a754..9f90e70e 100644 --- a/docs/configuration/completion.md +++ b/docs/configuration/completion.md @@ -57,33 +57,58 @@ TODO: Find a case where this actually fires : ) ## List -Manages the completion list and its behavior when selecting items. The most commonly changed option is `completion.list.selection`, which controls whether the list will automatically select the first item in the list, and whether selection shows a preview: - -To control the selection behavior per mode, pass a function to `completion.list.selection` that returns the selection mode: +Manages the completion list and its behavior when selecting items. The most commonly changed option is `selection.preselect/auto_insert`, which controls whether the list will automatically select the first item in the list, and whether a "preview" will be inserted on selection. +:::tabs +== Preselect, Auto Insert (default) ```lua -completion.list.selection = 'preselect' --- or -completion.list.selection = function(ctx) - return ctx.mode == 'cmdline' and 'auto_insert' or 'preselect' -end +completion.list.selection = { preselect = true, auto_insert = true } ``` +Selects the first item automatically, and inserts a preview of the item on selection. The `cancel` keymap (default ``) will close the menu and undo the preview. + +