Closed guibou closed 4 years ago
I think it's a good idea! :smile: But doesn't this go against Ormolu trying to keep the AST of the module the same while formatting it? Or maybe this is not something Ormolu tries to achieve anymore?
Things like this are possible, but it is true that it's a bit more work because we need to take these transformations into account when we check that AST has not changed. We already do this because e.g. we sort import statements.
Duplicate of #414.
Is your feature request related to a problem? Please describe.
The following multiples imports
in currently unchanged by ormolu.
Describe the solution you'd like
I'd like ormolu to group the imports when the context is the same (e.g. same module imported, same qualification and same alias) such as:
Describe alternatives you've considered
The current implementation can be left unchanged.