-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EncodedTokensProvider? #11
Comments
What is your use case? |
I'm still researching what exactly the encoded token provider strategy is about. So far it seems to me that using encoded tokens could lead to faster processing of tokens in the editor. So my goal is to find out if using encoded tokens would lead to a faster editor experience. I've tried implementing it, but it didn't work. The grammars did return tokens in binary format but they didn't seem correct. One of the visible results was that the colorization in the editor was all gone. So I thought asking, maybe you would know more since this is a textmate thing related to tokenization and I'm not too familiar with either. |
Encoded tokens only work when tokenizer is given a theme object, after which the color values are returned directly instead of token names ( or scopes). In case of monaco editor, one we don't have access to the theme, and two it doesn't accept color values directly but instead semantic token/scope names (and that too is very hacky) |
In monaco you can define your own theme passing it an IStandaloneThemeData object, would that be enough? I tried following some of the code of vscode and so implementing encoded tokenization won't be straightforward. I'll update the issue if I find a working solution. |
I just got a demo working that uses |
Do you plan supporting EncodedTokensProvider?
The text was updated successfully, but these errors were encountered: