-
Notifications
You must be signed in to change notification settings - Fork 196
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
Update semantic tokens service to better support The Future™ #10036
Conversation
|
||
namespace Microsoft.AspNetCore.Razor.LanguageServer.Semantic; | ||
|
||
internal class LSPCSharpSemanticTokensProvider(IClientConnection clientConnection, IRazorLoggerFactory loggerFactory) : ICSharpSemanticTokensProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a direct move from the sematic tokens service (and change to use LinePositionSpan). The idea is the OOP will have a different implementation of this service (that doesn't use LSP)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll trust you this and won't be reviewing this file :)
166c9e1
to
8a5839e
Compare
3d36512
to
5d628d4
Compare
8a5839e
to
e7bf11b
Compare
…act C# functionality to a separate service
e7bf11b
to
23c1c88
Compare
...icrosoft.AspNetCore.Razor.LanguageServer/Semantic/Services/IRazorSemanticTokenInfoService.cs
Show resolved
Hide resolved
...icrosoft.AspNetCore.Razor.LanguageServer/Semantic/Services/RazorSemanticTokensInfoService.cs
Show resolved
Hide resolved
@@ -1006,12 +1006,14 @@ private async Task VerifySemanticTokensAsync(string documentText, bool precise, | |||
options.HtmlVirtualDocumentSuffix == "__virtual.html", | |||
MockBehavior.Strict); | |||
|
|||
var cSharpSemanticTokensProvider = new LSPCSharpSemanticTokensProvider(_clientConnection.Object, LoggerFactory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100%! I was chasing the code fixes for a bunch of these, but I guess I missed a few. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to work in cohosting, and hence OOP, its a lot easier with a couple of relatively simple changes to the semantic tokens service:
This PR does both of those things, and also:
This is targeting the "regress cohosting" branch because it turns out this new design is impossible in cohosting right now 🤦♂️
Part of #9519