OrganizeImports v0.5.0-alpha.1
Pre-releaseThis pre-release contains a new feature and a couple of backward-incompatible changes. It aims to make existing IntelliJ IDEA users' life easier when adopting OrganizeImports
.
-
Allow customizing blank lines between organized import groups (#142)
The IntelliJ Scala import optimizer not only allows you group imports but also allows you to decide whether a blank line should be inserted between two adjacent import groups. This feature introduces a new configuration option
blankLines
. When it's set toManual
, you may configure blank lines by adding"---"
to thegroups
option. For example, now you can have the following configuration to groupjava
,javax
, andscala
imports together without blank lines:OrganizeImports { blankLines = Manual groups = [ "*" "---" "re:(javax?|scala)\\." ] }
By default,
blankLines
is set toAuto
, which preserves the original behavior, i.e., a blank line is automatically inserted between adjacent import groups.This makes migrating IntelliJ Scala import optimizer configurations of existing projects to
OrganizeImports
easier. -
Default value changes (#143 and #146 by @sideeffffect)
groupedImports
now defaults toMerge
groups
now defaults to["*", "re:(javax?|scala)\\."]
Both values follow the default configuration of the IntelliJ Scala import optimizer (as in version 2020.3).
Many thanks to all the feedback and contributions!