-
Notifications
You must be signed in to change notification settings - Fork 198
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
Add spell checking endpoints #8851
Conversation
return request.TextDocument; | ||
} | ||
|
||
public async Task<VSInternalSpellCheckableRangeReport[]> HandleRequestAsync(VSInternalDocumentSpellCheckableParams request, RazorRequestContext requestContext, CancellationToken cancellationToken) |
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.
Is this supporting Streaming? Can we make sure we support streaming and send chunks of ranges to make sure we don't pass too large objects to the Client?
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 doesn't at the moment, and its a little problematic. There is a limitation in the platform that we can't stream results from our custom message target. We could in theory allow Roslyn to stream the results, and collect the chunks in that target, but we'd have to send all of Roslyns results over to here in one go. Similarly we need to have all of Roslyns results here in one chunk, because we need to combine them with the Razor results, and being a delta based API, everything has to be in order.
We could in theory, once we've done all of the work, send the results back to the client in chunks from here, but I'm not sure that alone is worth it.
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.
LGTM! Spell checker responses look very semantic tokens-esque 😊
...Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SpellCheck/DocumentSpellCheckEndpoint.cs
Outdated
Show resolved
Hide resolved
var ranges = response?.First().Ranges; | ||
Assert.NotNull(ranges); | ||
|
||
// To make for easier test failure analysis, we convert the ranges back to the test input, so we can show a diff |
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.
👍
…heck/DocumentSpellCheckEndpoint.cs Co-authored-by: Allison Chou <allichou@microsoft.com>
FYI @veler