Michael Moore

Results 25 comments of Michael Moore

For others looking for an interim solution, you can use `onChangeRaw` prop with a function like the following: ```typescript function onChangeRaw(raw: null | undefined | string) { if (selectsRange) {...

With the proposed component API, you could easily set the testid in the test, instead baking it into the component itself. Prior to that, a skeleton prefix would be appreciated...

I did a bit of investigation, and this is a little trickier than I first thought. Shiki does not call transformers in codeToTokensBase (which is what expressive code uses). I...

Thanks for the response, and no worries about diving into the difficulties :) >Working with Shiki's hast output (which might have been heavily processed by transformers added by the user!)...

Yes, it uses the textmate scopes in explanations for a few things: - avoid coloring brackets in strings and comments - use correct language-specific config for embedded languages (eg TS...

> I haven't done much benchmarking yet (on my to-do). Well, I just did some quick benchmarking. Looks like `includeExplanation` makes it ~4.7x slower. Definitely not something to enable by...

In shiki 1.13, you can now set `includeExplanation: 'scopeName'` to only include the scope names but not the theme matches, which only results in a ~2x slowdown instead of ~5x....

Great :) > attach the extra information to the annotations it creates > loop through the annotations in any of the hooks running after the syntax analysis It would be...

That makes it simpler, but still I'd need to partially reconstruct the tokens from the annotations, process those, then create new annotations. If there was a `postProcessShikiTokens` hook, I could...

Currently my transformer works directly with shiki's themed tokens, finding matching bracket pairs and assigning them colors. It uses the `content`, `offset`, and `explanation` of each token to find the...