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.

I’m not sure how the colors of theme’s are being applied but lots of themes still look worse with the tree sitter, at least for C++ 😕I’d recommend upgrading the C++ TextMate grammar to pull from VS Code’s upstream source but even after that there are some bugs that need to be worked out.

I think this issue will be fixed when the TreeSitter only adds colors, and the added colors correspond to the theme’s colors for those things.

Material Theme:

With the tree sitter: material-with-sitter

Without the tree sitter and with the Better C++ Syntax extension (the upstream for the C++ syntax): material-no-sitter

XD Theme

Using a theme that is more fitted to C++ make the difference more extreme:

With the tree sitter: with-sitter

Without tree-sitter, and with Better C++ Syntax no-sitter

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jeff-hykincommented, May 30, 2019

Sounds good!

There is a large challenge around the naming though, longer names are not really sufficient. There is a TextMate naming convention that is used as a standard to get compatibility across languages. On the C++ TextMate repo, we’ve spent a lot of time with people from VS Code coordinating changes to the scopes, how they should be named, and then talking to theme makers when they change. Whenever the TextMate conventions don’t cover something, we search all of the other TextMate grammars in order to find the most similar naming among all languages.

It’s a non trivial task, there are 600 scopes in C++ and more are going to be added throughout the summer. Many of them are generated programmatically. That’s why I recommend starting with an existing C++ grammar and then only removing the parts that the Tree-Sitter replaces.

1reaction
georgewfrasercommented, May 27, 2019

Ok, I think I understand: right now I have all the keywords in two categories, keyword.control and keyword. Instead I should use the longer, more specific scopes like keyword.other.namespace or whatever it is, so that existing c++ color themes can pick them up and color them differently.

We’ll also need to put back a bunch of punctuation scopes for brackets and things, and it looks like entity.name.type is different than the scope c++ was using before.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Color Issues - NASA
Discussion of the 3D color gamuts of displays and the implications for design of usable color graphics. Sample image from the Choosing Background...
Read more >
8 common mistakes when working with color and how to fix ...
Most of the color issues designers face today come from small and tiny mistakes in our workflow. Working with color is an essential...
Read more >
Guide to color troubleshooting | plasticstoday.com
Guide to color troubleshooting · Base resin color shift · Colorant out of specification · Colorant letdown ratio is incorrect · Colorant heat...
Read more >
The Color Issue 2021 - House Beautiful
Here's what Jonathan Adler, Breegan Jane, Sasha Bikoff, Bailey Li, and Jenny Brown have to say. By Hadley Keller. Advertisement - Continue Reading...
Read more >
The problem of colour | OUPblog
However, philosophers and scientists have long thought that colours are not what they seem. There are two main reasons for this. First, there ......
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