This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[Feature Request] official guide for wiring TextMate grammars #3827
Labels
feature-request
Request for new features or functionality
Context
Description
Hello, I've been struggling to find a solution that works with TextMate grammars and the latest releases for
monaco-editor
andmonaco-editor-webpack-plugin
. I've tried following the linkedmonaco-tm
package and the issue here #1915, but it seems some of the theme helpersgenerateTokensCSSForColorMap
,TokenizationRegistry
, andColor
are no longer available. I even read the wonderful blog post about the deep dive into how it's all working to try and better diagnose the issue and just can't seem to get any solution to work.I previously had this working using
monaco-editor-textmate
, but that has recently broke betweenmonaco-editor
versions0.29.1
and0.30.0
zikaari/monaco-editor-textmate#26.I've managed to distill the wiring of textmate down to the solution below based on
monaco-editor-textmate
and theia. I know it's not the most performant route per se, but I was hoping to use monaco as an enhancement on top of server-rendered shiki code blocks so this will be loaded on demand if someone wants to play around with code examples.For some reason between those versions of the editor, the matched foreground (
tokenTheme._match(scope)._foreground
) has changed and is now returning a different foreground in some cases causing the syntax highlighting to be off.I was going to file as a bug, but since there is no official guide and these are accessing private APIs it makes sense they are prone to breaking. Is it possible this is something on the roadmap or in the meantime there is a solution to workaround this until official guides/utilities might be available? I appreciate any help and understand there are a lot of moving parts here to make this all work.
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
No response
The text was updated successfully, but these errors were encountered: