Skip to content

Commit

Permalink
docs: add example of static selection mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Saghen committed Dec 24, 2024
1 parent b430d35 commit 369f0dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/configuration/completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ Manages the completion list and its behavior when selecting items. The most comm
To control the selection behavior per mode, pass a function to `completion.list.selection` that returns the selection mode:

```lua
completion.list.selection = 'preselect'
-- or
completion.list.selection = function(ctx)
return ctx.mode == 'cmdline' and 'auto_insert' or 'preselect'
end
Expand Down

0 comments on commit 369f0dd

Please sign in to comment.