The files in the syntax directory should be named after the filetype detected by Vim. In the case of your C++ code, I'd expect it would detect it as cpp. You can check that with the following command:
Or you can use :set ft? for short.
Once you confirm that the filetype is indeed cpp, you can create file ~/.vim/after/syntax/cpp.vim (for ...
Most probably you have set spell enabled which usually checks spelling in comments.
If you don't need it turn it off with :set nospell. Activate when you need it with :set spell.
To toggle use :set spell!.
Map it if you do it often, for example:
nnoremap yos :set spell!<CR>
Then yos will toggle spelling.
I hacked it like this, by switching the keywords to a match rather than keyword definition:
syn match json_keyword "true\|false\|null" contained
This is okay because the number of keywords is small, and there are no words in JSON that are not keywords. So that is to say, now if we enter, say
the false part is highlighted as a keyword, ...
Is there anything I can do to correct the interpretation of the dollar signs by syntax highlighting?
Out of the box, so far as I know: No. However, you can use the special "TeX comment" %stopzone to stop the mathzones. In this particular case, you need multiple comments, so this should work: