Closed sellout closed 11 months ago
This was changed in #905 (grouping, but not with newlines). Can you try using Ormolu >=0.5.1.0? There, the output of your snippet should be
import ElidedPackage
import "otherpackage" Baz
import "this" Bar
import "this" Foo
import "whatpackage" Meh
Ah, sorry. This is fine for me, then.
I do think separating out "this"
would still be good (because it’s not actually a package name), but the blank lines I can take or leave.
I do think separating out
"this"
would still be good (because it’s not actually a package name)
Yes, I think that is a good point :+1:
Reopening in order to let #1057 close it again :smile:
Ormolu ignores the package name when sorting imports.
gets re-ordered by Ormolu to
I think imports should be sorted by package name then module. Imports without package qualifiers can be sorted as if the package were
""
.I think my ideal version would also separate out the special
"this"
package, rather than putting it among the “t”s. And maybe even include blank lines between the three groups (or perhaps just between"this"
and the other imports, to indicate that"this"
is handled specially: