-
Notifications
You must be signed in to change notification settings - Fork 93
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
trimTrailingWhitespace option is not respected by textDocument/formatting #827
Comments
Hello, In order to avoid the trailing newlines from being removed when formatting, please use If this addresses your issue, please let me know. |
Hi @datho7561, I don't really understand, how your suggestion is going to help, according to LSP Specification this is a completely different option:
vs.
Note that my example shows space characters being trimmed despite I disagree with "not a bug" label. |
Okay, sorry I missed the fact that the spaces were trimmed. I am able to reproduce it with unit tests, but not when running in VS Code. I'll do some more testing to figure out what's going on. |
When `trimFinalNewlines = true`, the formatter removes `'\r'` and `'\n'` from the end of the document instead of all whitespace. Fixes eclipse-lemminx#827 Signed-off-by: David Thompson <davthomp@redhat.com>
When `trimFinalNewlines = true`, the formatter removes `'\r'` and `'\n'` from the end of the document instead of all whitespace. Fixes #827 Signed-off-by: David Thompson <davthomp@redhat.com>
In short:
Here is a full listings of communications (I'm using pylspclient in a Python script):
The text was updated successfully, but these errors were encountered: