You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Client always sends textDocument/semanticTokens/full almost immediately after didOpen and didChange, which means that we may not have all the schema at that point. As a result not supporting this call initially may provide occasionally "flickering UX" (colours change as the user types), but the upside is that it can't be any worse than it is, because we are just enriching the highlighting and the static grammar in VSCode extension still provides the base.
Proposal
Another way of resolving this would be also pushing update from the server back to client when we have the schema via workspace/semanticTokens/refresh, but it's questionable whether this is the best use case for that method.
I believe that textDocument/semanticTokens should always attempt to wait for some sensible time until schema is available, or timeout and return no (additional) tokens. This would also avoid the extra roundtrip in most cases.
The text was updated successfully, but these errors were encountered:
#344 may be better way to resolve this than effectively delay rendering / response, but I'll keep this open until we have at least prototype of #344 to fully understand the UX implications.
Current Version
Use-cases
As mentioned in #331:
Client always sends
textDocument/semanticTokens/full
almost immediately afterdidOpen
anddidChange
, which means that we may not have all the schema at that point. As a result not supporting this call initially may provide occasionally "flickering UX" (colours change as the user types), but the upside is that it can't be any worse than it is, because we are just enriching the highlighting and the static grammar in VSCode extension still provides the base.Proposal
Another way of resolving this would be also pushing update from the server back to client when we have the schema via
workspace/semanticTokens/refresh
, but it's questionable whether this is the best use case for that method.I believe that
textDocument/semanticTokens
should always attempt to wait for some sensible time until schema is available, or timeout and return no (additional) tokens. This would also avoid the extra roundtrip in most cases.The text was updated successfully, but these errors were encountered: