Search code examples
intellij-ideaide

How to use specified XML file to format code on remote IntelliJ Project?


How can I force IntelliJ, when working on a remote project, to use the specified format specified in an XML file?

I noticed that no matter what settings I put, the formatter in IntelliJ will not honor my settings and will instead use the default formatter.

I have tried going on the remote host and changing the settings, change the settings in the cache, and changing the settings on my guest machine. Nothing seems to stick.

When I am connected to remote via IntelliJ, I can go to preferences and confirm that my desired format settings for Java are set. However, when I format, again, the default formatter is used.


Solution

  • What ended up working was creating the project on my local machine. This creates a .ijwb and related bazel project files.

    I then moved this .ijwb folder to my remote machine. This fixed the issue and used the correct bazel options and formatter options.