Allow formatting service to ignore the OnTypeFormatting option#8372
Merged
davidwengier merged 1 commit intodotnet:release/dev17.6from Mar 3, 2023
Merged
Conversation
davidwengier
commented
Mar 2, 2023
ryzngard
approved these changes
Mar 2, 2023
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Member
Author
|
whoops, jumped the gun, i thought the merge from main had gone in |
1598589 to
15c5665
Compare
Member
Author
|
Force pushed, and retargeted to 17.6 for M2 purposes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was a lot more complicated than I thought, so after chatting with @ryzngard this is taking the easy way out, since the hard way would require big changes to formatting.
With this change the actual formatting service doesn't check the on type formatting setting, just the LSP endpoints do, with this PR specifically adding that check to the auto insert endpoint. This means the setting will also turn off XML doc comment completion, but I think thats a reasonable compromise for now. It also means the setting has no effect if Single Server is turned off, but we have no reason to think anyone has done that anyway.
There is a comment explaining that, and a bit more, in the code.
Closes #4336
@phil-allen-msft I think we should take this for M2