Spotless: IDEA-180965: Add support for IntelliJ formatter

Created on 8 Feb 2018  路  5Comments  路  Source: diffplug/spotless

The line wrapping options that can be configured with IntelliJ _seem_ to be a little bit more flexible than the one available in Eclipse (e.g. lambda-related preferences).

The closest thing I've found to format Java sources using an IntelliJ code style is its command line formatter. Although that still requires having the full binaries of IntelliJ (but I hope to be wrong!).

enhancement

Most helpful comment

It would be awesome if this come into reality!

All 5 comments

Happy to merge a PR for this, but currently nobody is working on it.

You can use a custom step do this, there's an example of how to do this (and a description of its shortcomings) in #119.

Commented interesting issue on the IntelliJ issue tracker related to this enhancement:

https://youtrack.jetbrains.com/issue/IDEA-180965

Also: Provide standalone formatter or API https://youtrack.jetbrains.com/issue/IDEABKL-7685

If you don't care about using the IntelliJ formatter specifically, but rather just the IntelliJ IDE to autoformat in a way that agrees with Spotless, another path forward would be to make a plugin for IntelliJ that calls out to the spotless IDE hook. For example, here's a plugin for VSCode.

It would be awesome if this come into reality!

Was this page helpful?
0 / 5 - 0 ratings