From 8d87a144456588daad713d1e66a062df06f51f48 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Fri, 27 Dec 2024 23:20:48 +0100 Subject: [PATCH] nvim: dynamic completion selection for blink.cmp --- home/config/nvim/plugins/blink-cmp.fnl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/home/config/nvim/plugins/blink-cmp.fnl b/home/config/nvim/plugins/blink-cmp.fnl index d851498..3775d9b 100644 --- a/home/config/nvim/plugins/blink-cmp.fnl +++ b/home/config/nvim/plugins/blink-cmp.fnl @@ -30,7 +30,10 @@ : [:scroll_documentation_up :fallback] : [:scroll_documentation_down :fallback] : [:hide :fallback]} - :completion {:list {:selection :manual} + :completion {:list {:selection (fn [ctx] + (if (= ctx.mode :cmdline) + :manual + :preselect))} :menu {:min_width 20 :max_height 25 :draw {:treesitter [:lsp]}}