Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Option to disable formatting #109

Open
americk0 opened this issue Jun 13, 2019 · 1 comment · May be fixed by #112
Open

Option to disable formatting #109

americk0 opened this issue Jun 13, 2019 · 1 comment · May be fixed by #112

Comments

@americk0
Copy link

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

@50Wliu
Copy link
Contributor

50Wliu commented Jun 15, 2019

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.

@50Wliu 50Wliu linked a pull request Jun 19, 2019 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants