question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TextMate grammar not applying correctly to minimap

See original GitHub issue

As 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

Screen Shot 2020-12-01 at 10 27 53 PM

@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:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexdimacommented, Dec 29, 2020

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 / update TokenizationRegistry by yourself.

1reaction
bolinfestcommented, Dec 16, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Language Grammars — TextMate 1.x Manual
Language Grammars. Language grammars are used to assign names to document elements such as keywords, comments, strings or similar.
Read more >
Optimizations in Syntax Highlighting - Hacker News
Shameless plug: my implementation of Sublime's syntax highlighting engine in Rust has similar optimizations and more. I'm not at my computer ...
Read more >
February 2017 (version 1.10) - Visual Studio Code
Editor. Preview: Minimap. A Minimap gives you a high level overview of your source code which is very useful for quick navigation and...
Read more >
syntect - crates.io: Rust Package Registry
library for high quality syntax highlighting and code ... Basically I'll be maintaining the library but not developing it further.
Read more >
TextMate grammar not having any matches on VS Code
In markdown files, there is a regex error logged to the dev console: ERR target of repeat operator is not specified: Error: target...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found