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

[Feature] Add interactive Dart Fix command #98

Open
akinsho opened this issue Oct 14, 2021 · 2 comments
Open

[Feature] Add interactive Dart Fix command #98

akinsho opened this issue Oct 14, 2021 · 2 comments

Comments

@akinsho
Copy link
Collaborator

akinsho commented Oct 14, 2021

I've just discovered the dart fix --apply and the dart fix --dry-run commands which can apply all the analyser preview then apply all the analyser fixes.

I think this functionality could be built in to this plugin by showing the results of dry-run in a floating window then a user could accept the changes or not which would then run apply if they accept the changes.

See: https://flutter.dev/docs/development/tools/flutter-fix

@Hannnes1
Copy link

I realize that this is an older issue, but I would just like to add some more information, since it seems like this feature is not present yet.

In addition to dart fix in the terminal, Vs Code and Android Studio also has the ability to apply fixes to individual warnings / errors. It would be nice to be able to do that in Neovim as well.

Link to the relevant Flutter docs: https://docs.flutter.dev/tools/flutter-fix#applying-individual-fixes

@sidlatau
Copy link
Collaborator

Individual fixes are already supported by the analyzer, they are visible in code actions (see "Rename to 'bodyMedium'"):
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants