Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ficcdaf opened this issue Dec 14, 2024 · 0 comments
Labels
feature New feature or request

Comments

@ficcdaf
Copy link

ficcdaf commented Dec 14, 2024

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.

@ficcdaf ficcdaf added the feature New feature or request label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant