-
Notifications
You must be signed in to change notification settings - Fork 316
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
Add a settings entry that enables dartfmt style fixes #1141
Comments
This will need some support from the Dart analysis server in the SDK before we can add it here. @bwilkerson do you know if this is planned? |
We have not discussed the possibility of supporting running For what it's worth, I'll point out that all of the fixes that it implements are also supported as quick-assists in server. That's less automated than many users want, but also more modular (in the sense that users can choose which set of changes to make). We have discussed various ways of making server's quick assists and quick fixes more automated. For example, we have discussed having an "apply everywhere" option. Unfortunately, we have not yet implemented that. |
Fixing all instances of a problem would definitely be a neat help (dart-lang/sdk#32474). I was thinking maybe we could implement auto-fixing editor-side but I don't think we could currently get all the required fixes in a fast way (I guess it's similar to dart-lang/sdk#32462) so this probably would need at least some work in the server. |
When using the LSP preview with a recent enough SDK (note: this doesn't currently include stable channels, though it will make its way there in the next stable releases) you can now apply many fixes to the whole file: https://dartcode.org/releases/v3-17/#lsp-apply-all-fixes This isn't exactly what was asked for here, though perhaps it satisfies the original requirement. @pschiffmann let me know if you think otherwise. Thanks! |
This issue has been marked stale because it is tagged awaiting-info for 30 days with no activity. Remove the stale label or comment to prevent the issue being closed in 10 days. |
style fixes were added to dart_style in version 1.1.0. It would be great if I could opt-in to these in VS Code.
The text was updated successfully, but these errors were encountered: