monaco-editor version: 0.14.3
Browser:Chrome
OS: Windows
Steps or JS usage snippet reproducing the issue:
From Hover provider example in monaco playground
i got the Hovers word with the below code
var keyword=model.getWordAtPosition(position).word
but how can i identify whether the word is a keyword or identifier or some other token that we have registered??
There is currently no API to retrieve the token types because they are not stored anywhere. Only the resulting colors are stored.
You can use the independent API monaco.editor.tokenize(text, languageId).