Skip to content
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 on-type formatting #530

Merged
merged 1 commit into from
May 8, 2018
Merged

Conversation

fbricon
Copy link
Collaborator

@fbricon fbricon commented May 7, 2018

requires eclipse-jdtls/eclipse.jdt.ls#655

Signed-off-by: Fred Bricon fbricon@gmail.com

Signed-off-by: Fred Bricon <fbricon@gmail.com>
@fbricon
Copy link
Collaborator Author

fbricon commented May 7, 2018

@snjeza can you please test it on Windows?

Copy link
Contributor

@snjeza snjeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works fine on Windows and Linux.

@fbricon fbricon merged commit dd96808 into redhat-developer:master May 8, 2018
@fbricon
Copy link
Collaborator Author

fbricon commented May 15, 2018

On-type formatting is enabled via the global "editor.formatOnType": true, preference, but can be controlled specifically for Java with the java.format.onType.enabled preference.

Formats current line when typing ; or <enter>
format-on-type

Formats current block when closing it with } (or <enter> after a } )
format-block-ontype

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants