Raw c/c++ code: what are the keys for variables and non-primitive types?

I can’t really get the variables and non-primitive types to be highlighted (you are seeing the variables in light blue just because i made everything in light blue)

Also the fact that it does not accept anything else but .sublime-syntax in yaml and .tmTheme in xml is kinda, ehm, incompatible with things you may find online

Is there a way to make them a different color?

Well, change the styling in a .tmTheme file and use it? I don’t know if parser has a unique scope for them. If not, then you also will have to update the .sublime-syntax file. Or use text show rules for specific tokens, i.e., show "list": set text(red).

bat has a huge collection of parsers, all of which are using the .sublime-syntax. I think it’s probably the most common format in Rust ecosystem/libraries. It’s documented and all. So Typst uses it for non-Typst languages.

1 Like

It’s what I’m trying to do :,(
But it doesn’t get either variables or types, it’s so strange because they are so simple things

I also tried different .sublime-syntax files but nothing

I don’t really know what to do, it’s so difficult for nothing

(Also what’s bat?)

This is bat. It’s an alternative to the ct CLI tool.