This is where rkward looks for syntax highlighting definition files:
~/.local/share/katepart5/syntax
This directory may not exist, so it has to be created. Other sources say that
~/.local/share/org.kde.syntax-highlighting/syntax
is also an option for Kate.
data -> syntax) to these directories, e.g.:ln -s ~/git/syntax-highlighting/data/syntax/r.xml ~/.local/share/katepart5/syntax/r.xml
ln -s ~/git/syntax-highlighting/data/syntax/r.xml ~/.local/share/org.kde.syntax-highlighting/syntax/r.xml
Then, you can just stick to working with the r.xml file in the git repository.
In the xml file, change “version” in the language field to a higher number, so this custom file is used by Kate.
NA different from NULL and Inflist below the others at the top of the document:<list name="NA">
<item>NA</item>
<item>NA_integer_</item>
<item>NA_real_</item>
<item>NA_complex_</item>
<item>NA_character_</item>
<item>is.na</item>
</list>
In the context “Common rules”, add:
<keyword attribute="Missing Values" context="#stay" String="NA"/>
In the <itemDatas>, add a new <itemData> for “Missing values”:
<itemData name="Missing Values" defStyleNum="dsDataType" spellChecking="false" bold="1"/>
See the documentation which unique defStyleNums are available.
Last updated: 2020-11-06