-
Notifications
You must be signed in to change notification settings - Fork 58
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
Formatting selected code doesn't work anymore, the whole file is formatted instead #1127
Comments
According to this code, the range parameters (the given text selection) are only used if the LS does not support document formatting and if the text selection has length 0. That does not make sense to me. It seems the last change on LSPFormatter accidentally changed the conditions. |
travkin79
added a commit
to travkin79/lsp4e
that referenced
this issue
Oct 1, 2024
travkin79
added a commit
to travkin79/lsp4e
that referenced
this issue
Oct 1, 2024
travkin79
added a commit
to travkin79/lsp4e
that referenced
this issue
Oct 2, 2024
Also adapt mock server to support range formatting and add tests.
rubenporras
pushed a commit
that referenced
this issue
Oct 3, 2024
Fixed in LSP4E 0.26.6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue
If you select some text in an LSP-based text editor and then you use the shortcut for formatting code (Ctrl + Shift + F on PCs), then the whole file is formatted instead of formatting the selected text only.
The text was updated successfully, but these errors were encountered: