Closed IndianBoy42 closed 3 years ago
How I imagine this working:
Virtual text shows up. Press a hotkey (e.g.
<C-h>
) to accept it.
Questions:
How I imagine this working:
1.Virtual text shows up
Answers
this is a super cool idea, I am not sure how this might work say if we already have some virtual text or something, but I will see what can be done.
To be clear, this is like a lower priority feature that will come after user defined snippets and such.
the ghost text is here :)
I lied about this coming after user defined snippet.
The virtual text previewing selected completion
coq_settings.display.ghost_text.enabled
default:
True
coq_settings.display.ghost_text.context
Surrounding decoration around ghost text
[" 〈 ", " 〉"]
coq_settings.display.ghost_text.highlight_group
Ghost text colours
Comment
What about making the ghosttext render over the text that would be replaced, rather than just to the right of the cursor? Also is it possible to have the pum not show up by default, but be brought up by a keypress?
honestly? cuz it was in your screenshot l0l
i suppose i could revisit this some time, but it will be after custom snippets
I would love the ghost text rendering over the replaced text! A lot clearer.
An example from the fish shell website
Fish shell implements a kind of 'inline' suggestions, wherein the first completion is showed as dull text after the cursor, the user can hit to get that completion, and then hit it again to get the full list.
I think something similar to the first part could be implemented using virtual text from neovim. Plus some configuration and keymaps to choose when to expand the full completion list, when to accept the first suggestion, when to cycle completion in virtual without opening the completion list, etc
The current completion popup window works fine, and should be the default for parity with other IDE, but this behaviour could be a more sleek and less visually disruptive way of presenting autocompletions for some people
(I also asked about this idea to compe but it hasn't been implemented yet)