I am currently developing a custom sublime tmLanguage file for bioinformatics related files. I have read the usual tutorials and am all set up with AAAPackageDevelopment. My first goal is to highlight nucleotides, which appear as strings containing [AaTtCcGgNnUu]. I would like to be able to specify my own scopes, and assign colors to them within my tmLanguage file.
Here is an example for the A base:
patterns:
- comment: Adenine
match: "[Aa]+"
name: constant.other.nucleotide.adenine
From what I can tell, .tmTheme files handle the assignment of actual color codes to scopes. I have found examples (https://github.com/hackerfriendly/ACTG) where the nucleotide highlighting was done by assigning existing scopes (ones that are defined in the default/currently loaded tmTheme file) to each base. I would like to have more control over this.
One obvious approach would be to include a .tmTheme file with my .tmLanguage file, but I would like to just add more theme rules to an existing theme, not completely overwrite a users existing theme.
I would love some advice or ideas on how to accomplish this,
Thanks!