dart-sublime-bundle icon indicating copy to clipboard operation
dart-sublime-bundle copied to clipboard

integrate with dart_style

Open guillermooo opened this issue 10 years ago • 4 comments

It seems to be ready for general use:

https://pub.dartlang.org/packages/dart_style

guillermooo avatar Apr 13 '15 05:04 guillermooo

If we find dartfmt in an sdk subdir, warn users that they should be using dart_style.

@sethladd Is dart_style going to remain as pub package meant to be installed via 'pub global'. Or is it planned to be included in the SDK?

guillermooo avatar Apr 14 '15 21:04 guillermooo

Since you have integrated with the Analysis Server already, you could get the formatting through the server API:

http://htmlpreview.github.io/?https://github.com/dart-lang/bleeding_edge/blob/master/dart/pkg/analysis_server/doc/api.html#request_edit.format

  • Jaime

jwren avatar Apr 14 '15 21:04 jwren

Oh, wow, didn't know that... I'm falling behind! :)

Thanks!

guillermooo avatar Apr 14 '15 21:04 guillermooo

I've just noticed that the new dartfmt's command line options are compatible with the sdk's version, though, so users that have the new one installed can already use it now. That's a good stop-gap solution until I get around to implementing the formatting through the server.

guillermooo avatar Apr 14 '15 21:04 guillermooo