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

Format on save #2278

Open
sigiesec opened this issue Apr 26, 2018 · 3 comments
Open

Format on save #2278

sigiesec opened this issue Apr 26, 2018 · 3 comments

Comments

@sigiesec
Copy link

It would be great if the Xtend Eclipse Editor could be configured to apply the formatting whenever a file is save (like Preferences / Java / Editor / Save Actions / Format source code for Java).

I am not sure if this happens as part of formatting automatically, but it should also be configurable to remove trailing whitespaces as part of this.

@tivervac
Copy link
Contributor

tivervac commented Jul 17, 2018

We have something similiar in our product by hooking into XtextDocumentProvider.doSaveDocument() but this has some quirks with regards to cursor placement after the format on save and saving during refactoring. An upstream solution would be welcome.

@achimmihca
Copy link

I am looking for the same feature.
Additionally it would be great to be able to only "Format edited lines", which is also an option of the Java Save Actions. This way old code will not be formatted to avoid lots of changes in version control systems.

@cdietrich cdietrich transferred this issue from eclipse/xtext-xtend Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants