From 369f0dd8416ec07dfcfe81b92d1a9f96c99d58a2 Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Tue, 24 Dec 2024 11:38:18 -0500 Subject: [PATCH] docs: add example of static selection mode --- docs/configuration/completion.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/configuration/completion.md b/docs/configuration/completion.md index 13a42056..020aea63 100644 --- a/docs/configuration/completion.md +++ b/docs/configuration/completion.md @@ -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