-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for external Eclipse formatter settings #623
Comments
related to redhat-developer/vscode-java#2 |
So the idea would be to
We need a way to gather all properties keys, default values and descriptions, by scripting something that'd extract all the info from JDT's DefaultCodeFormatterOptions , FormatterMessages and FormatterMessages.properties That'll be a LOT of keys to expose. So we'll start small with a small subset of 10 sensible options |
@fbricon We could enable importing an Eclipse formatter xml file and define two following properties:
I have attached the jdtls formatting options as an example. |
I can't get line wrapping to work for some reason ( Seems referencing |
I can't reproduce the issue.
Java LS doesn't format comments.
We could also add the "java.format.comments" property, false by default. |
Changing eclipse-java-google-style.xml definitely does not trigger a workspace/didChangeWatchedFiles event |
ok let's do that, but with java.format.comments:true by default, same as eclipse |
Any idea why |
Does it work in Eclipse? |
yes, it works fine in Eclipse. Say if you have package foo.bar;
public class Foo with package foo.bar;
public class Foo instead of package foo.bar;
public class Foo |
@fbricon I think you have used the standard Eclipse formatter in Eclipse and the Google formatter in VS Code. I have updated the PR. Could you, please, test again. |
In order to use the formatter, you need an Eclipse formatter file like https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml Set the following property:
The property can point to an URL or a local file path.
|
We should expose (wrapped) jdt formatter options
The text was updated successfully, but these errors were encountered: