Add config option for instant completion entry preview. - #7189
Conversation
|
I think somebody mentioned plans that the completion preview should use virtual text in the future, instead of inserting it as actual text until confirmed. I'm not sure if this is actively being worked on, though. |
Seems like a nice addition, but it doesn't quite solve the specific problem addressed by this PR. Having the option to not preview anything at all is still different from having a virtual text without direct insertion. |
There was a problem hiding this comment.
I think somebody mentioned plans that the completion preview should use virtual text in the future, instead of inserting it as actual text until confirmed. I'm not sure if this is actively being worked on, though.
that was an idea that some people mentioned in #6594 but I don't think it's feasible. I am not sure if we want a config opinion for this we are usually a bit hesitant to introduce those. The behavior here matches VSCode/Intellij so this is pretty established behavior. Considering that the changes to get this working are quite small I would lean Towards supporting this. The implementation itself LGTM
… true). Signed-off-by: Luca Schlecker <luca.schlecker@hotmail.com>
This PR adds the config option
preview_completion_insertwhich controls the insertion behavior of autocompletion.Currently, Helix inserts the selected completion entry instantly into the document (reversible with c-c), this behavior is a personal preference though and should be configurable, as I prefer it to only insert on confirmation.
The new option defaults to true, thus the default behavior is not changed.