Adding a word to the list of syntax keywords


#1

So I was working in c++ and noticed that the particular theme I’m using (not sure if all of atom is like this) doesn’t highlight the keyword “string” in c++. I was wondering how I might go about doing that. Essentially, I am trying to make the word “string” look like the word “void”:

image

How would I add the word “string” to the list of keywords for c++?


#2

What is the scope of the word string? Check this using the command Editor: Log Cursor Scope in the command palette.


#3

It says it’s source.cpp


#4

This means that you cannot have a special colour for the string word (at least not when using the language-c package). To implement it would require a lot of work, and I don’t know enough about C++ to help in that way.


#5

Alright. Thanks for letting me know!