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

Show selected popupmenu item using virtual text #28608

Open
famiu opened this issue May 2, 2024 · 0 comments
Open

Show selected popupmenu item using virtual text #28608

famiu opened this issue May 2, 2024 · 0 comments
Labels
completion Nvim built-in (omni)completion enhancement feature request needs:discussion For PRs that propose significant changes to some part of the architecture or API
Milestone

Comments

@famiu
Copy link
Member

famiu commented May 2, 2024

Problem

'completeopt' without noinsert can be way too intrusive as you can't easily add characters to the completion prefix. But 'completeopt' with noinsert is also not optimal as it actually inserts text into the buffer when an item except the first one is selected. Moreover, noinsert makes it harder to preview the result of picking the first completion item without inserting it unless you do something like <C-n><C-p>.

Expected behavior

It is possible to leverage virtual text for this. We can either:

  • Show virtual text for noinsert instead of inserting the text. OR,
  • Add a virttext flag (tentatively named) to completeopt, which will show the selected item using virtual text.
@famiu famiu added enhancement feature request completion Nvim built-in (omni)completion labels May 2, 2024
@justinmk justinmk added the needs:discussion For PRs that propose significant changes to some part of the architecture or API label May 2, 2024
@justinmk justinmk added this to the unplanned milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completion Nvim built-in (omni)completion enhancement feature request needs:discussion For PRs that propose significant changes to some part of the architecture or API
Projects
None yet
Development

No branches or pull requests

2 participants