Make cohost formatting honour C# formatting options#12042
Merged
davidwengier merged 4 commits intodotnet:mainfrom Jul 29, 2025
Merged
Make cohost formatting honour C# formatting options#12042davidwengier merged 4 commits intodotnet:mainfrom
davidwengier merged 4 commits intodotnet:mainfrom
Conversation
alexgav
reviewed
Jul 18, 2025
| [DataMember(Order = 2)] | ||
| public bool CodeBlockBraceOnNextLine { get; init; } = false; | ||
| [DataMember(Order = 3)] | ||
| public RazorCSharpSyntaxFormattingOptions? CSharpSyntaxFormattingOptions { get; init; } |
Contributor
Member
Author
There was a problem hiding this comment.
Yeah, null is fine for the default and matches existing behaviour. In future we can probably clean it up more, if we remove the old LSP, and we can roll out proper formatting options support to code actions and auto insert etc. but no need to open that can of worms now.
This was referenced Jul 30, 2025
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.
Fixes #11839
Needs dotnet/roslyn#79458 before it will compile
This just tweaks the "override C# settings for tests" system we had into a formal "can specify C# settings before formatting" option, and then in cohosting we grab the options from Roslyn (via new EA API) before jumping to OOP.