Skip to content

Semantic tokens that are not in ascending order will not be highlighted #1451

@imbant

Description

@imbant

I pushed a minimum reproducible demo

When the order of semantic tokens provided by the language server is inconsistent with the order in the document character stream, non-ascending semantic tokens will not be highlighted. This will not be the case when using language clients based on the VS Code API, and highlighting will not be affected by token order.

Phenomenon:

image

The code for providing semantic tokens between the language server and the client is almost exactly the same.
image

doubt:

No requirement for the order of semantic tokens was found in the LSP documentation.
Is this a requirement for LSP? Or is it a bug in the vscode-languageserver/node npm package?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunities

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions