Open ikhoon opened 5 years ago
I always enable Settings Sync, so I'm not sure I'd be able to use a settings repository.
An alternative to look at would be adding build scripts that use the IdeaPlugin
so the ./gradlew idea
task sets it up automatically. I've had good experience with this.
This might be an example (in Java, but the XML logic would actually be a lot simpler if migrated to a Groovy build script)
It's a bit tricky ensuring the right merge semantics, but once it's done once it works well I think.
Unfortunately, Settings Sync can't come with Settings Repository, which is a current limitation. But you can add multiple read-only setting repositories. If a user wants to get & apply Armeria IntelliJ settings, he or she adds the settings Github URL as a read-only source.
And IdeaPlugin
also looks so good. I agree sharing IntelliJ setting with XML
(ie. intellij-java-google-style.xml) is more explicit, clear, and easy to maintain than settings.jar
. Thanks for sharing it!
I recently found out that the code style of an intellij idea can be extracted to .editorconfig
But this has some problems, but I think it might be useful.
It seems like customizing IdeaPlugin
in Gradle is the way to go at the moment, because a user doesn't have to import anything manually.
@trustin If I'm not mistaken, InteliJ's default is to respect editorconfig without any manual import. In the years since writing IdeaPlugin integration, IDEA's made some good progress on it and editorconfig might actually be enough, except for copyright header unfortunately. My current code pattern is to not bother configuring IDEA with a copyright header and using spotless to automatically add it, and apply any (google java) formatting that may have been missed by editorconfig before committing.
Incidentally, the intellij idea is correct, but Eclipse requires a separate plugin to be installed. I'm used to the Armeria setup, so I'm using it for my personal projects. :sunglasses:
See https://github.com/heowc/SpringBootSample/blob/main/.editorconfig
Exporting
settings.jar
is no longer supported inIntelliJ Idea
. We have to migrate it intosettings.zip
. Additionally sharing settings through a settings repository looks good for initial setup and continuous updating.