Help sorting imports
I am part of a project where the import sorting rules are alphabetical, but a new line in between each letter group. I know that "Import all other imports" will sort alphabetically, but is there a way to have it add new lines in between each letter? I've already tried adding each letter and a blank line in the rules manually, but that didn't work as it wouldn't match "foo.*" to "f.*". I then tried "f*.*", but that still didn't work. Any other ideas?
Please sign in to leave a comment.
You could write a plugin for that.
How many different top level names are in your project? Shy of writing your own plug-in as Vojtěch suggests, I think the only thing you could do would be to add each known top level package name to the list. If a new one is added via a new dependency, you just need to add it: