[mini.completion] Auto Select first Suggestion (on C-y) #2040
-
Contributing guidelines
Module(s)mini.completion QuestionCan you configure mini.completion such that C-y (or any configured key) will automatically accept the first suggestion? I find it a bit cumbersome to navigate down to the first suggestion, then accept it. I already use mini.keymap with CR as pmenu_accept. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Yes, it is possible by using Note, that this should probably work fine if you want to explicitly select with |
Beta Was this translation helpful? Give feedback.
Yes, it is possible by using
noinsertflag in 'completeopt' instead of (suggested)noselect. For example, by using the following full value:vim.o.completeopt = 'menuone,noinsert,fuzzy,nosort'. It can be done before or afterrequire('mini.completion').setup(), it doesn't matter.Note, that this should probably work fine if you want to explicitly select with
<C-y>or a remap. There might be issues with not applied additional text edits (it might require selecting an item and wait for a bit), but it might be good enough.