Skip to content

Semantic Token - Highlighting problem on multilines #524

Answered by msujew
theogiraudet asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @theogiraudet,

this isn't necessarily a bug nor intended behavior, but a vscode limitation. Language clients provide a boolean multilineTokenSupport for the semanticTokens request. If that's false, 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 doc assignment (using the findNodeForFeature method) and generate a semantic token for each line that belongs to the comment node.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@theogiraudet
Comment options

@msujew
Comment options

@theogiraudet
Comment options

Answer selected by theogiraudet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants