microsoft / microsoft/monaco-editor
Semantic highlighting does not appear to work (due to theming)
Open
Nobody has claimed this yet.
bug
semantic-tokens
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
- I expect the first four characters to be highlighted but nothing happens.
- There is no documentation really for any of the functions but
releaseDocumentSemanticTokensin particular is not clear to me what I should be doing there.
monaco.languages.register({
id: 'new'
});
monaco.languages.registerDocumentSemanticTokensProvider('new', {
getLegend: () => {
return {
tokenModifiers: [],
tokenTypes: [
"keyword"
]
}
},
provideDocumentSemanticTokens: () => {
return {
data: [
0, 0, 4, 0, 0
]
}
},
releaseDocumentSemanticTokens: () => {
}
});
monaco.editor.create(document.getElementById("container"), {
value: "12345678",
language: "new"
});
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.