-
Notifications
You must be signed in to change notification settings - Fork 107
dartfmt is deprecated #190
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
Comments
That's... annoyingly quick, as deprecations go. I think we might want to basically replicate the functionality from dart-lang/dart-vim-plugin#125, which checks whether |
Shell alias is completely ignored in vim syscalls IIRC. Did you try setting dartfmt_executable instead? Something like |
Thank you malcolmr, that would be great if codefmt solve this by check dart version. |
I find a simple work around here, Just put a small excutable shell script name 'dartfmt' under one of your $PATH directory, for example: /usr/local/bin/ , where 'which' command can find it.
Make sure the |
Yes, that should work if the I'd suggest to minimize overhead for the new case by always attempting |
@dbarnett This doesn't work because of the spaces.
By adding
|
K, then it needs a fix like 293c208 to support spaces. Thanks for checking. In the meantime, your shell script workaround is the best bet. |
Note that this was mostly done in #224, though I see we actually have a bug: we switched |
d927656 changed the dartfmt_executable flag from a string to a list, but didn't change the use inside IsAvailable(), leading to: Failed to evaluate whether formatter dartfmt is available: Vim(return) :E730: Using a List as a String The change uses the ResolveFlagToArray() helper in both IsAvailable() and FormatRange() (which incidentally also allows defining the flag using a Function), and updates the documentation for all flags using ResolveFlagToArray() to use the same phrasing. Fixes google#190.
Describe the bug
The
dart format
command replacesdartfmt
.Dart SDK version: 2.16.1 already removed
dartfmt
command line tool.I try to use alias as a work around, but not working.
alias dartfmt='dart format -o show'
thanks!
The text was updated successfully, but these errors were encountered: