Making your own syntax highlighting sheme for your language?


I like to edit C++ files with IntelliJ, and would like to create my own syntax highlighting sheme for it (I do not want to use any C++ plugin, they do not work well for me and make things worse instead of better, like e.g. displaying every single line in your file as an error because it is confused by something, and syntax hightlighting is enough for me, I don't need go to declaration or code understanding etc...)

I know that you can specify a form of syntax highlighting under the "File Types" settings, but this is too primitive, and since IntelliJ 13 is no longer useful, because in IntelliJ 12, it would highlight only full words, but in IntelliJ 13 it also highlights parts of words separated by an underscore, so if you have a variable named "mutable_something", it will show with "mutable" colored, even though it's not a keyword if part of a longer identifier.

Many text editors, like Geany, gedit, etc... allow specifying a more advanced form of syntax highlighting based on a text file with regexes etc.... Does something similar exist for IntelliJ? Is there some functionality available to help with writing a plugin specific to syntax highlighting? Is there already something available to help with more advanced rules than just display this exact word in another color"? Regexes and lexers are not a necessity for me, but at least being able to distinguish between being split by an underscore vs being split by whitespace, to solve the above "mutable_something" problem, would be nice.


1 comment
Comment actions Permalink

You can install the TextMate bundles support plugin from Settings | Plugins and install the TextMate bundle for C++ - that's quite a bit more powerful than IntelliJ's built-in custom file types.

The highlighting of identifiers with underscores is a bug, please report it to


Please sign in to leave a comment.