C++ themes

Can you suggest me any theme which has the file for the cpp in the code of the syntax? (here is missing)
I would like to create a theme but I don’t know what the settings are and I can’t find any theme to learn

Lack of a language specific style-sheet does not directly imply the theme has no support for syntax highlighting with this language. Does C++ highlighting look bad with this or maybe default light/dark/solarized themes?

Perhaps it would help to know a little more about how syntax highlighting works?

When a file is parsed (usually by tree-sitter these days, sometimes by the older regex based text-mate highlighting), each line of text is divided up into <span> tags. These spans get classes based on what’s inside them, like .syntax--keyword:

You can see what gets used for a particular file/word by opening up the dev tools and inspecting a line of text.

Because many languages share similar traits (all of them have keywords, most have function declarations and arguments, most have numeric and/or string literals), you don’t usually need anything special to fully highlight a language.

The extra files you see in city lights syntax are for special cases, like this style in html.less that makes sure mustache/handlebars templates get their double curly braces highlighted a special color.

If there’s a particular C++ construct you want to be a particular color for your theme, just write a rule that targets it specifically (please ignore my horribly outdated C++ knowledge):

1 Like

I think this question will have a negative answer or you may even not know but can you change the way atom takes any construct?
I mean when you write something like vector<int> v(n); in c++, atom takes it as function(becuse of the brackets), but it’s a simple vector declaration so is there a way to create a “new type” to identify it?

Guessing here, I would explore types in haXe.