You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`IntelliJIDEA` is a powerful IDEfor java, kotlin and many more languages. There are [specific variants](https://www.jetbrains.com/products/) for almost any modern language
1592
+
and a plethora of [plugins](https://plugins.jetbrains.com/).
1593
+
1594
+
Spotless provides access to IntelliJIDEA's command line formatter.
1595
+
1596
+
1597
+
```gradle
1598
+
spotless {
1599
+
format 'myFormatter', {
1600
+
// you have to set the target manually
1601
+
target 'src/main/**/*.java','jbang/*.java'
1602
+
1603
+
idea()
1604
+
.codeStyleSettingsPath('/path/to/config') // if you have custom formatting rules, see below for how to get them
1605
+
.withDefaults(true) // Use the default code style settings when the code style is not defined for a file type (default: true)
1606
+
1607
+
// if idea is not on your path, you must specify the path to the executable
1608
+
idea().binaryPath('/path/to/idea')
1609
+
}
1610
+
}
1611
+
```
1612
+
1613
+
### How to generate code style settings files
1614
+
TODO
1615
+
1616
+
### Limitations
1617
+
- Currently, only IntelliJ IDEA is supported - none of the other jetbrains IDE. Consider opening a PR if you want to change this.
1618
+
- Launching IntelliJ IDEA from the command line is pretty expensive and as of now, we do this for each file. If you want to change this, consider opening a PR.
1619
+
1584
1620
## Generic steps
1585
1621
1586
-
[Prettier](#prettier), [eclipse wtp](#eclipse-web-tools-platform), and [license header](#license-header) are available in every format, and they each have their own section. As mentioned in the [quickstart](#quickstart), there are a variety of simple generic steps which are also available in every format, here are examples of these:
1622
+
[Prettier](#prettier), [eclipse wtp](#eclipse-web-tools-platform), [IntelliJ IDEA](#intellij-idea) and [license header](#license-header) are available in every format, and they each have their own section. As mentioned in the [quickstart](#quickstart), there are a variety of simple generic steps which are also available in every format, here are examples of these:
0 commit comments