Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LSP Razor formatting for Razor code block directives (dotnet/razor#1573)
LSP Razor formatting for Razor code block directives - Support for @code/@functions block formatting - Except when it contains Markup or other Razor constructs - Added a RazorFormattingService which is invoked by the RazorFormattingEndpoint. - Added a custom razor/rangeFormatting command that the server can use to ask the client to format a range of the projected C# or HTML document - Added a CSharpFormatter and HTMLFormatter that invoke the above mentioned command - Added FormattingSpan and its corresponding visitor to represent Razor understanding of indentation - Moved the document mapping code to a separate RazorDocumentMappingService service for ease of use - Added necessary extension methods for convenience. Some of them were copied from Roslyn - Some cleanup - Added a C# test formatter to enable unit testing. Right now it calls Roslyn APIs directly. As far as I've seen its behavior is the same as OmniSharp formatting except it doesn't remove trailing whitespace and empty lines. I am following up with people to understand why that is the case. Added/updated tests \n\nCommit migrated from dotnet/razor@62051b9 Commit migrated from dotnet/aspnetcore@f1ccf855ebfc
- Loading branch information