amatiasq / vsc-sort-imports

Sort ES6 imports automatically.
ISC License
58 stars 24 forks source link

Use as formatter #15

Closed OliverJAsh closed 6 years ago

OliverJAsh commented 6 years ago

VSCode has the concept of file formatters which can be ran using the Format Document command. This command can also be configured to run on save with "editor.formatOnSave": true.

Have you thought about adding sort-imports as a formatter? This would provide consistent with other formatters like Prettier.

amatiasq commented 6 years ago

I didn't know that, that would be an amazing addition to integrate with VS. Do you know where to find documentation about this?

OliverJAsh commented 6 years ago

This might help: https://code.visualstudio.com/blogs/2016/11/15/formatters-best-practices

amatiasq commented 6 years ago

We were talking about this in #7. The problem is VSCode only allows one formatter at the time and we don't want to force users to choose between sort-imports and any other formatter out there because it's not what this extension is focused on.