-
Notifications
You must be signed in to change notification settings - Fork 294
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
Review surroundingPairs in language config #3264
Comments
After reviewing this and testing again, I'm not sure removing things like parens is the best idea. Other similar languages have these settings, and there is a VS Code user setting that allows changing these. If we remove the parens, users can't add them back - whereas if we leave it as-is, the user can switch to only quotes in the VS Code settings if they want. So I think the best options are:
@timsneath - any opinions on this (since you noted it at #3183 (comment))? |
I don't have a ton of opinions here -- I trust your judgement! My own experiences were improved considerably when I turned off the experimental settings. In general, I find it really useful to have the editor help me when I'm typing a line of code -- for example, when I type the open parenthesis on a new line of code and it sets me up with the parameters I need. But it's really frustrating when I'm editing an existing line of code and tab to complete a method only to have it insert or overwrite the remainder of the line. But perhaps others have either a better intuition for what the editor is about to do than I do... |
I think there are two related, but different things here. For the surroundingPairs (the behaviour when you have a selection and press I think the other comments relate to completion, and when we insert the parens/argument placeholders automatically - and I agree there's room for improvement there too. There are some cases we try to handle to avoid inserting them when they're already there after the caret, though I'm not sure it covers enough cases (I saw some unwanted parents inserted just today). I've filed #3303 as a reminder to take a look. Thanks! |
(I'll close this one and leave as-is, but if it comes up more, I'll consider the second option above, leaving the language to define all of the pairs, but defaulting to |
I just landed a fix for #3303 in dart-lang/sdk@8f2c0e9 that prevents inserting the parens/arg placeholders when they already exist for the target you're completing. However, re-reading what you wrote:
I don't know if I misunderstood and there's something else going on here. Perhaps you mean this: ^foo(bah); You complete at |
See #3183 (comment).
The text was updated successfully, but these errors were encountered: