ide-java icon indicating copy to clipboard operation
ide-java copied to clipboard

Option to disable formatting

Open americk0 opened this issue 6 years ago • 1 comments

Summary

Add an option to disable formatting of files on save to the settings page.

Motivation

I love this tool but I'm unable to use it on collaborative projects where the style guide is anything but the defaults for this package. My teammates have agreed to use the Google Java Style Guide (but tweaked slightly to use 4-space indent, 8-space indent when breaking a statement over multiple lines, and 100 character maximum per line) for the specific project I want to use this extension for, but unfortunately while this package is enabled, it auto-formats the current file turning would-be one line PRs into potentially hundreds of line changes and breaking the style guide.

Describe alternatives you've considered

I've tried looking through the Eclipse JDT language Server's documentation to see if maybe there's a flag that can be passed to disable formatting but wasn't able to come up with anything. I also looked for a way to specify a custom formatting configuration but wasn't able to find anything there either.

Additional context

americk0 avatar Jun 13 '19 15:06 americk0

Good news: I've figured out how to pass settings to the language server :). I see some format options there, so we should be able to control that once I get something hooked up properly in ide-java. No guarantees on when that will happen, though.

winstliu avatar Jun 15 '19 18:06 winstliu