devkanro / intellij-protobuf-plugin

IntelliJ-based IDEs Protobuf Language Plugin that provides Protobuf language support.
Apache License 2.0
83 stars 12 forks source link

Codestyle config is deleted when matching defaults #267

Open simonzn opened 4 months ago

simonzn commented 4 months ago

We commit .idea/codeStyles/Project.xml into our Git repositories to ensure that all developers use the same code style, whether they use this plugin or the bundled Protocol Buffers & gRPC plugins.

However, if our codestyle settings match the defaults of this plugin, the configuration is removed from the Project.xml as soon as the first .proto file is formatted, and if someone happens to commit the changed codestyle, everybody uses the defaults again - which depend on the plugin. E.g., default indentation for this plugin is 4 spaces whereas it is 2 spaces for the bundled Protocol Buffers plugin.

Can this be avoided, i.e. could the Project.xml be left as is, even if it contains unnecessary settings?

I admit I don't know whether this is an issue with this plugin or inherent behaviour of IntelliJ IDEA.

devkanro commented 3 months ago

I think this is an inherent behavior of IDEA. I just implemented some interfaces according to the documentation. I suggest you raise an issue in the IDEA community.