You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- 'preselect' will automatically select the first item in the completion list
-- 'auto_insert' will not select any item by default, and insert the completion items automatically when selecting them
I would like to the see another option that combines them both.
The documentation could be described as:
-- 'preselect_auto_insert' will automatically select the first item in the completion list, and insert the completion items automatically when selecting them
The default preselect action though should not trigger auto_insert as this would be annoying.
So to accept the first solution one still has to press the keyboard shortcut for accept or select_and_accept.
But after selecting with select_prev and select_next, auto_insert should trigger and accepting would no longer be necessary.
The text was updated successfully, but these errors were encountered:
After migrating from nvim-cmp, I kept the same behavior by using the following code.
local list = require "blink.cmp.completion.list"
local select = list.select
list.select = function(idx, o)
select(idx, o)
local item = list.items[idx]
require("blink.cmp.completion.trigger").suppress_events_for_callback(function()
if idx and idx > 1 and item and list.config.selection == "preselect" then
list.apply_preview(item)
end
end)
end
it would be better if there is an option to combine "auto_inesrt " and "preselect".
Feature Description
Citation from default config:
I would like to the see another option that combines them both.
The documentation could be described as:
The default preselect action though should not trigger
auto_insert
as this would be annoying.So to accept the first solution one still has to press the keyboard shortcut for
accept
orselect_and_accept
.But after selecting with
select_prev
andselect_next
,auto_insert
should trigger and accepting would no longer be necessary.The text was updated successfully, but these errors were encountered: