I have been working on a number of simple libraries and wanted to add their keywords to the IDE highlighter.
The first thing that will be obvious when you attempt to build a keywords.txt file is that the only entries that are parsed are for KEYWORD1 and KEYWORD2.
Although it is possible to specify keywords for KEYWORD3 (green) and LITERAL1 & LITERAL2 (both blue), these entries are treated as KEYWORD2 (orange).
Nothing that I have done seems to change this behaviour in the slightest.
Making changes to the entries for these theme colours in [Arduino] ~/lib/theme/theme.txt makes precisely no difference at all.
#FUNCTIONS COLOR #D35400 - ORANGE KEYWORD1 #FUNCTIONS COLOR #D35400 - ORANGE KEYWORD2 #STRUCTURE COLORS #5E6D03 - GREEN KEYWORD3 #VARIABLES COLOR #00979C - BLUE LITERAL1 ...
To actually change anything, you need to change the entries further down the file.
# TEXT - KEYWORDS # FUNCTIONS editor.keyword1.style = #d35400,bold editor.data_type.style = #d35400,bold # METHODS editor.keyword2.style = #D35400,plain editor.function.style = #d35400,plain # STRUCTURES editor.keyword3.style = #5E6D03,plain editor.reserved_word.style = #5E6D03,plain
Changing the RGB triplets (the numbers following the # signs) will change the colour of the type of keyword described. Note, however, that you need to change both entries. I changed the keyword1 colour to #AE4000 (a brownish orange)
Further down there are other syntax highlights you can change.
While we are inside the theme.txt file, there are a couple of other changes that you might like to make:
# little pooties at the end of lines that show where they finish editor.eolmarkers = false editor.eolmarkers.color = #999999
This causes paragraph marks to be displayed at the ends of lines. If you change false to true, these will show up. Making them a pale grey #DADADA (if you are using the light theme) makes them much less obtrusive.
The other convenience is edit-line highlighting (useful if you have lots of code in your sketches):
# highlight for the current line editor.linehighlight.color=#e2e2e2 # highlight for the current line editor.linehighlight=false
If you change false to true, this will show up - as a grey background behind the line where the cursor is currently sitting. I prefer #F2F2F2, as this is a less heavy hint than the #E2E2E2 default.
Finally, I find that comments are a little too pale to read comfortably, to change this, the relevant lines (neat the top of the file) are:
#ERROR COLOR #A61717 - RED #COMMENTS // COLOR #95A5A6 - LIGHT GREY #COMMENTS /**/ COLOR #434F54 - DARK GREY
if you change #95A5A6 - LIGHT GREY for #434F54 - DARK GREY then comments become much more readable.
I hope this helps.