blink.cmp icon indicating copy to clipboard operation
blink.cmp copied to clipboard

Feature request: Option to display ghost text of the first option when `completion.list.selection == "manual"`

Open ficd0 opened this issue 1 year ago • 0 comments

Feature Description

Motivation

I really like the ghost text feature. However, I also have completion.list.selection = "manual" set in my config. I like using enter to accept the selection, and using arrow keys to actually pick the selection. Since blink is so damn fast, I need to set the selection mode to manual, otherwise I will keep accidentally accepting a suggestion when I meant to hit enter after writing a line of text.

However, I also like binding Tab and C-Enter to select_and_accept. Sometimes, the first suggestion is fine, and I like having a dedicated key for selecting and accepting it. I would like to be able to see this in ghost text, without having it be selected, so I'm free to press enter and start a new line.

Desired Behavior

What I would like to see is an option for the ghost_text to show the option that would be selected if I were to hit a select_and_accept key.

Example

Consider the following image:

image

In this case, I would like interrogating to be displayed in ghost_text. I would like sending the select_and_accept command to actually insert interrogating. However, I would like the accept command to do nothing, since interrogating isn't actively selected, just the next option.

Implementation

I think an additional configuration option, in the same table as ghost_text with a default value of false would be suitable. I'm not too familiar with the codebase, so I don't know how challenging this would be to implement. If the maintainers can let me know if this is a feature they would consider merging, then I can try implementing it myself.

ficd0 avatar Dec 14 '24 00:12 ficd0