Semantic Token - Highlighting problem on multilines #524
-
|
Hello, else if(isDocumentation(node)) {
acceptor({ node, feature: "doc", type: SemanticTokenTypes.comment, modifier: SemanticTokenModifiers.documentation });
}But when I test the result: Is there a bug or I doing something wrong? Here is the code: Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hi @theogiraudet, this isn't necessarily a bug nor intended behavior, but a vscode limitation. Language clients provide a boolean Generally, I would recommend you to use the textMate grammar support in that case. Alternatively, you can manually identify the cst node that belongs to the |
Beta Was this translation helpful? Give feedback.


Hi @theogiraudet,
this isn't necessarily a bug nor intended behavior, but a vscode limitation. Language clients provide a boolean
multilineTokenSupportfor thesemanticTokensrequest. If that'sfalse, the client will discard any response data which tries to do semantic highlighting for multiple lines. Unfortunately, that's the case for vscode:Generally, I would recommend you to use the textMate grammar support in that case. Alternatively, you can manually identify the cst node that belongs to the
docassignment (using thefindNodeForFeaturemethod) and generate a semantic token for each line that belongs to the comment node.