It’s definitely possible (in theory, with the current API), although I don’t know of any theme or package that implements it. I’ve thought about adding this to my own theme (base16-syntax), but dismissed it as something noone would want. Perhaps I should reconsider it. The hardest part would probably be figuring out a nice way to make it configurable in the Settings UI. Ideally you’d like to have a Language Specific part, with a dropdown menu for language, color scheme and style. If one language specific setting is configured, an empty one appears, and so on. I don’t think this is currently supported in Atom, so having 3 arrays (one for language, color and style) that together represent a list of triples will also work, but it is ugly, user unfriendly and error prone.
I also have a feeling this should be possible within
init.coffee, to load whatever theme package based on grammar.