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
{{ message }}
Repository navigation
VS Code reports errors for semantic tokens that include newlines, should be stripped by the client? #1638
About Semantic Tokens, the LSP spec says (reasonably IMO):
If multiline tokens are not supported and a tokens length takes it past the end of the line, it should be treated as if the token ends at the end of the line and will not wrap onto the next line.
However VS Code does not support this, it instead writes an error to the console - even if it is only the line ending (which is valid IMO) included in the range.
The suggestion at microsoft/vscode#244266 (comment) is that the LSP client "truncates" any LSP tokens that include the new line character (or any further characters) in their range, or that the spec is updated to remove this (I think this is a breaking change, and I also think it is a bad change - since IMO a newline that's part of a multiline string should still be included in a token).
Activity
dbaeumer commentedon Jun 5, 2025
Need to see what the performance implications are since it would require inspect every token.