You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a command to write recommended settings to the users User Settings for Dart #1302
This appears to be the same issue as microsoft/vscode#44200. Frustratingly, it seems like this is finally getting a fix (microsoft/vscode#57093) but only for completions - yet the issue seems to affect general text edits. I'll open an issue in VS Code about this.
Second, when I attempt to type a widget name, say SizedBox, in the widget placeholder text I get no code completion.
If you press Ctrl+Space does the completion work correctly (it seems to for me)? The snippet mode (where you can tab between placeholders, etc.) is controlled by VS Code and I'm not sure if we can force completion open automatically (but I'll do a little more digging).
If you press Ctrl+Space does the completion work correctly (it seems to for me)?
Yes, when I press that I see a 'loading' message for few seconds, and then the completions.
The weird thing is, if I after doing the refactor move the cursor out of widget, back into widget, delete widget and then start typing, then I get the expected immediate completion behavoir...
I've opened microsoft/vscode#63129 about the indenting - seems to be an issue with SnippetStrings rather than general edits.
The weird thing is, if I after doing the refactor move the cursor out of widget, back into widget, delete widget and then start typing, then I get the expected immediate completion behavoir...
Yeah, that's because it exits snippet mode (when it's in snippet mode, you'll see a box around the word widget.
In my quick testing, this seems to solve the issue. Give it a test and see what you think. If we think it works well, we could add it to the Recommended Settings page (which I'm thinking of - at some point - showing a one-time notification to point people at).
Is it not possible to set settings like this programmatically for .dart files?
It is, though I'm not too keen on the idea of changing VS Code defaults just for Dart, since it means people using VS Code for other languages will have inconsistencies they might not understand (it also feels a bit aggressive for us to change their settings, even if it is just for Dart). That's why I started the recommended settings page - to try and draw attention to what I generally consider bad VS Code defaults, and allow users to read the descriptions and pick which ones they want.
I don't feel strongly though, my opinion would be swayed, but I'd want to be fairly sure users wouldn't object. We'd also need to figure out when to set them (since ideally we'd write them into their settings file so they can see what we've done, but we don't want to put them back in if the user deleted them).
changed the title [-]Missing completions and bad formatting after 'wrap' refactoring[/-][+]Consider automatically applying some recommended settings to Dart files[/+]on Nov 15, 2018
This came up again in the context of completion improvements - when we're sorting the most relevant to the top of the list and VS Code jumps halfway down the list to "the last thing you typed" it just looks buggy.
My main concern with changing these in configurationDefaults (where we set indenting, for ex.) is that if the user tries to set their own value in the VS Code settings editor, they appear to just "not work" (because language-specific defaults from an extension are higher priority than user-specified non-language-specific settings).
As a possible workaround, we could prompt the user the first time, asking if they want to use our recommended settings - and if so, write them explicitly into their settings (instead of using defaults). That way it's opt-in, the user has visibility of what we set, and if they decide to change them they're all visible in their settings without having to worry about the "hidden Dart defaults" they'd need to override).
changed the title [-]Consider automatically applying some recommended settings to Dart files[/-][+]Offer to write recommended settings to the users User Settings for Dart[/+]on Aug 8, 2019
Re-purposing this to add a command so that we can get feedback on the settings before encouraging all users. The command is Dart: Use Recommended Settings.
I've opened #1946 to add a show-once prompt that will run the command for you in the next version. I'll try to encourage people to use it and provide feedback in the release notes.
changed the title [-]Offer to write recommended settings to the users User Settings for Dart[/-][+]Add a command to write recommended settings to the users User Settings for Dart[/+]on Aug 26, 2019
Activity
DanTup commentedon Nov 14, 2018
This appears to be the same issue as microsoft/vscode#44200. Frustratingly, it seems like this is finally getting a fix (microsoft/vscode#57093) but only for completions - yet the issue seems to affect general text edits. I'll open an issue in VS Code about this.
If you press Ctrl+Space does the completion work correctly (it seems to for me)? The snippet mode (where you can tab between placeholders, etc.) is controlled by VS Code and I'm not sure if we can force completion open automatically (but I'll do a little more digging).
mit-mit commentedon Nov 14, 2018
Yes, when I press that I see a 'loading' message for few seconds, and then the completions.
The weird thing is, if I after doing the refactor move the cursor out of
widget, back intowidget, deletewidgetand then start typing, then I get the expected immediate completion behavoir...DanTup commentedon Nov 14, 2018
I've opened microsoft/vscode#63129 about the indenting - seems to be an issue with
SnippetStringsrather than general edits.Yeah, that's because it exits snippet mode (when it's in snippet mode, you'll see a box around the word
widget.I managed to find this:
microsoft/vscode#57153
It seems that you can disable this with a VS Code setting:
In my quick testing, this seems to solve the issue. Give it a test and see what you think. If we think it works well, we could add it to the Recommended Settings page (which I'm thinking of - at some point - showing a one-time notification to point people at).
mit-mit commentedon Nov 14, 2018
Yeah, that works a lot better!
Is it not possible to set settings like this programmatically for .dart files?
DanTup commentedon Nov 14, 2018
It is, though I'm not too keen on the idea of changing VS Code defaults just for Dart, since it means people using VS Code for other languages will have inconsistencies they might not understand (it also feels a bit aggressive for us to change their settings, even if it is just for Dart). That's why I started the recommended settings page - to try and draw attention to what I generally consider bad VS Code defaults, and allow users to read the descriptions and pick which ones they want.
I don't feel strongly though, my opinion would be swayed, but I'd want to be fairly sure users wouldn't object. We'd also need to figure out when to set them (since ideally we'd write them into their settings file so they can see what we've done, but we don't want to put them back in if the user deleted them).
[-]Missing completions and bad formatting after 'wrap' refactoring[/-][+]Consider automatically applying some recommended settings to Dart files[/+]DanTup commentedon Aug 8, 2019
This came up again in the context of completion improvements - when we're sorting the most relevant to the top of the list and VS Code jumps halfway down the list to "the last thing you typed" it just looks buggy.
My main concern with changing these in configurationDefaults (where we set indenting, for ex.) is that if the user tries to set their own value in the VS Code settings editor, they appear to just "not work" (because language-specific defaults from an extension are higher priority than user-specified non-language-specific settings).
As a possible workaround, we could prompt the user the first time, asking if they want to use our recommended settings - and if so, write them explicitly into their settings (instead of using defaults). That way it's opt-in, the user has visibility of what we set, and if they decide to change them they're all visible in their settings without having to worry about the "hidden Dart defaults" they'd need to override).
[-]Consider automatically applying some recommended settings to Dart files[/-][+]Offer to write recommended settings to the users User Settings for Dart[/+]DanTup commentedon Aug 26, 2019
Re-purposing this to add a command so that we can get feedback on the settings before encouraging all users. The command is Dart: Use Recommended Settings.
I've opened #1946 to add a show-once prompt that will run the command for you in the next version. I'll try to encourage people to use it and provide feedback in the release notes.
The settings it will write are the ones from https://dartcode.org/docs/recommended-settings/ inside the
"[dart]"section.[-]Offer to write recommended settings to the users User Settings for Dart[/-][+]Add a command to write recommended settings to the users User Settings for Dart[/+]DanTup commentedon Aug 26, 2019
Hmmm, apparently the issue I opened is now a 404 🤷♂️ I've re-opened it and it got the same issue number 🤔
#1946