-
Notifications
You must be signed in to change notification settings - Fork 368
Description
In VSCode, when the server implements only range requests for semantic tokens, sending workspace/semanticTokens/refresh appears to generally have no effect on the active editor. Semantic tokens are only updated when the editor changes or is scrolled.
Related to dotnet/vscode-csharp#6884
Repro steps
- Implement only range requests for semantic tokens
- Invoke
workspace/semanticTokens/refreshfrom the server
Actual Behavior:
Editor does not refresh tokens in the active editor. In the sample extension, I created a range only server and a command to explicitly trigger the refresh. After executing the command, tokens are not refreshed until the active editor is scrolled. Repro code is here - dibarbet/vscode-extension-samples@8389281
Expected Behavior:
When the server sends an explicit refresh request, tokens in the viewport should be refreshed if the server only implements range requests.
This is important for the C# server as semantic tokens will be very incorrect while the project is loading. We send a refresh request when complete to ensure that the tokens are updated. We do not support full semantic tokens requests due to computation cost.
