-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
Configure selector keys for suggest widget #3658
Comments
It's already part of the |
@joaomoreno Could you elaborate? Can't find anything on this. Just so we're talking about the same thing. Yes,
|
Oh! Apologies, I confused the two features! |
Removing Enter from the acceptance keys would make the whole interaction rather strange, though. I'm not sure that would be such a good idea. You'd type There are other possibilities here:
|
I agree that the convention of Enter might not be so popular to remove.
is perhaps a more valid example for e.g. C++. Other languages have for sure syntaxes which could collide with completion trigger characters. It depends on the coding style of the programmer in this instance. It might also come in play when you do an anonymous function calls (lambda abstraction):
That is why I'm suggesting that each provider with trigger characters should be able to override the default mapped keys for |
So a C++ user could never use the Enter key to accept a suggestion? I'm not sure that is OK. I do recognise the problem though. @stevencl any thoughts? |
A C++ could very well be able to use this. I'm just suggesting that this choice is left for the extension to control and ultimately by the end user which configures the extension. It all depends on the preferences of the user base. As it stands now, the "only" solution is to disable Enter as a shortcut for all extensions and languages. |
Is it possible to trigger on a string, or sequence of characters? So instead of triggering on '>' we would trigger on '->' for C++? |
@stevencl That's actually a nice workaround. At least for languages with -> as member operators. |
ping @jrieken |
Currently there is no way to configure a trigger sequence but only single characters. Still, the issue would continue to exist as most people run with 24x7 IntelliSense enabled. I tend to favour an option that configures if |
see #1657 for more on this |
closing this as a duplicate of #1657 as we will go down the path of configuring what Enter does |
Whenever suggest widget (e.g. a completion list) is summoned (by a configured trigger character, e.g.
.
or>
), both Tab and Enter are valid for selection by default. More than once I've accidentally accepted the suggestion rather than doing a line break as intended.mitaki28/vscode-clang#8 is a good example of this where a
completionProvider
is configured and triggered by>
, causing issues when trying to do a line break:At first I thought I'd suggest that the default should be only Tab to avoid all of this. But then I came to think that perhaps more ideally this should be configurable by the extension that registers a provider with
triggerCharacters
. What do you think?The text was updated successfully, but these errors were encountered: