TextMate grammar not applying correctly to minimap
See original GitHub issueAs of https://github.com/microsoft/monaco-editor/commit/47ffd256b99e4245cc1768a3c0e32fa1648567fc, I seem to have the distinction of being the example for how to leverage TextMate grammars in standalone Monaco. Recently, someone noticed that the colors in the minimap do not match those of the editor when TextMate grammars are used!
I just updated my demo page to enable the minimap for an easier repro: https://github.com/bolinfest/monaco-tm/commit/256705b1dc4129bd9ed969762f3dfe8168077e97
And yes, this is on monaco-editor@0.21.2
:
https://github.com/bolinfest/monaco-tm/commit/e213ab514499ad119bd539f43011809aa7dd9902
@alexdima I see that the minimap is a <canvas>
element, so if you have any pointers at where to start looking to debug this, I’d really appreciate it!
monaco-editor version: 0.21.2 Browser: Google Chrome Version 87.0.4280.67 OS: macOS Catalina
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
I’ve pushed https://github.com/microsoft/vscode/commit/67bff68034ce7c5ca6123d5c4703a0d4f6bfae98 which adds
monaco.editor.setColorMap
. Once a new version is out (this or next week), and if you adopt this, you won’t have to generate CSS / updateTokenizationRegistry
by yourself.I just landed a fix for this in monaco-tm: https://github.com/bolinfest/monaco-tm/commit/2f39a9947ea22bc1abac12f6697e132acecb8528.