monaco-editor
monaco-editor copied to clipboard
[Feature Request] Expose semantic tokens API
Context
- [X] This issue is not a bug report. (please use a different template for reporting a bug)
- [X] This issue is not a duplicate of an existing issue. (please use the search to find existing issues)
Description
Hello,
I'm trying to get the semantic tokens &/or modifiers of the current loaded model, but i didn't find any exposed API to do so, i was forced to use something like the following on typescript to get the semantic tokens of a specific line:
const model = editor.getModel();
const tokens = (model as any)._tokenization._textModel._semanticTokens._pieces[0].getLineTokens(4);
Is there any way to make an exposed method, for example: getSemanticTokens on the model class which will return the semantic tokens for the current model?
Thanks!