-
Notifications
You must be signed in to change notification settings - Fork 106
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
tiny change to Reformat , so that it will be the same user experience as Java in Intellij IDEA #115
Conversation
2. do not pop out show reformat dialog twice
@sonicning Thank you so much for working on this! Your PR looks all good and the there are two things that I'm worrying about
So I would like to suggest that its better to show the reformat dialog if any there are any selections in the file so that the user can choose their preferred action. WDYT? |
|
If we look at Java experience in IntelliJ, it does nothing when it fails to format. I suppose we can do the same. Here, if the server does not support partial formatting it will be communicated at the initial stage of the LSP protocol via server capabilities. Even after that, if the client sends a partial formatting request we can simply ignore it. As a user, falling back into the full file formatting is not the accepted behavior for me. Rather I would expect do nothing when if fails to format.
Agree with @sonicning IMO We don't need to add extra steps into formatting. This should be the same as Java partial formatting. |
If you could have a look at the
Yeah that is the default behavior for java in IDEA. What I was saying is that we can add an improvement where if the attached language server does not support partial formatting we can simply notify it to user and ask to format the file only if the user wants. But I think we can think about it after merging this since its not a blocker for now :) |
@NipunaRanasinghe Yes, Good idea, I will look into that when I have time, thanks |
Purpose
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+12-b304.10)
OpenJDK 64-Bit Server VM (build 11.0.3+12-b304.10, mixed mode)
$ ./clangd --version
clangd version 8.0.0 (tags/RELEASE_800/final)
Learning