Open marrej opened 8 months ago
@isidorn what do you think?
I like the points @marrej is making. And this feels like a bug to me. If we decide to tackle this, I would suggest we start without a flag. And just have the behaviour @marrej proposses for everyone, and in case we hear complaints, then we can look into adding a flag.
Thoughts?
Copilot explicitly asked for this behavior. I think it should be easy to override it, by configuring a custom keybinding:
I'm not sure a custom keybinding is exactly the best way forward. That introduces unneccessary mental load for the users who would have to either explicitly change the keybinding or learn to work with InlineSuggest in a different manner. (not the muscle memory Tab
)
That is why I originally proposed for Completions to actually controll this via additional data (like done with the enableForwardStability), so that Providers can choose to ignore this if neccessary, without introducing toil for the user.
Problem statement
InlineCompletion can in most cases be accepted by
Tab
, but can't be accepted when there is Tab in between the cursor and the completion. This causes issues e.g. when interacting with multiline completions, which can be accepted by line.Tab
This model of interaction causes frustration for users, who expect that the acceptance would actually apply the completion. And creates unwanted space for errors.
To replicate try here (try accepting line and fully accepting completion from the line 8)
Possible solution
I understand that there might be some internal reasons to why this was introduced, so I wonder whether we can at least allow the specific completions (Completion Providers) to decide whether this should be applied or not. The same way as
enableForwardStability
is a inlineCompletion flag.enableTabPrefixAcceptance
would be a flag that would allow extensions to have a better control over the acceptace of their provided completions.