Add new Roslyn JSON classifications#6390
Conversation
|
We should definitely share these somehow |
I wonder if that would be a bad idea. If a user specifies different colors for classifications (which is completely allowed) then we wouldn't respect them right? |
|
We have a tracking issue for exposing C#'s semantic tokens legend to Razor: dotnet/roslyn#61237
I think what David is saying (feel free to correct me if I'm wrong) is that instead of hardcoding the C# token types we should be pulling the types in from Roslyn (maybe via reflection?). I'm pretty sure we can do this via external access (tracked by the work item above) |
|
Yeah, just to remove the fragility of us needing to chase around after Roslyn every time they add new token types. |
| RazorCommentType, | ||
| RazorCommentTransitionType, | ||
| RazorCommentStarType, // 90 | ||
| RazorCommentTransitionType, // 100 |
There was a problem hiding this comment.
These were mostly for helping me back when I was doing a lot more of this by hand back in the day, if the comment numbers are annoying to maintain feel free to destroy them.
| new SemanticTokenType("extension method name"), // 30 | ||
| new SemanticTokenType("field name"), | ||
| new SemanticTokenType("interface name"), | ||
| new SemanticTokenType("json - array"), |
There was a problem hiding this comment.
Ya totally agree, this doesn't seem like a sustainable way to add more support for embedded embedded languages in C#.
@CyrusNajmabadi how would you feel about generalizing C# embedded language classifications? Aka, "Embedded array, embedded comment etc."? Asking because if we continue to add this type of support then in VS, VSCode (basically any platform trying trying to consume these changes) there will be a requirement for the consumers of the C# side to chase down these classifications in order to populate their classifications properly.
|
Here's the existing issue tracking programmatic inclusion of C# classifications. |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Summary of the changes