Skip to content
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

Closed
pschiffmann opened this issue Aug 4, 2018 · 5 comments
Closed

Add a settings entry that enables dartfmt style fixes #1141

pschiffmann opened this issue Aug 4, 2018 · 5 comments

Comments

@pschiffmann
Copy link

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.

@DanTup
Copy link
Member

DanTup commented Aug 4, 2018

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?

@DanTup DanTup added is enhancement blocked on dart / flutter Requires a change in Dart or Flutter to progress in editor Relates to code editing or language features labels Aug 4, 2018
@DanTup DanTup added this to the On Deck milestone Aug 4, 2018
@bwilkerson
Copy link

We have not discussed the possibility of supporting running dartfmt with the fix option.

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.

@DanTup DanTup modified the milestones: On Deck, Backlog Aug 13, 2018
@DanTup
Copy link
Member

DanTup commented Aug 13, 2018

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.

@DanTup
Copy link
Member

DanTup commented Dec 8, 2020

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:

Apply-all fixes

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!

@DanTup DanTup added the awaiting info Requires more information from the customer to progress label Dec 8, 2020
@github-actions
Copy link

github-actions bot commented Jan 8, 2021

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.

@github-actions github-actions bot added the stale Will be closed soon if no response. label Jan 8, 2021
@DanTup DanTup added fixed in dart / flutter and removed awaiting info Requires more information from the customer to progress blocked on dart / flutter Requires a change in Dart or Flutter to progress in editor Relates to code editing or language features is enhancement stale Will be closed soon if no response. labels Jan 11, 2021
@DanTup DanTup removed this from the Backlog milestone Jan 11, 2021
@DanTup DanTup closed this as completed Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants