ERB and mixed, scoped syntax highlighting


#1

ERB is used as a templating language for a bunch of stuff unrelated to Ruby and HTML. For example, Puppet uses ERB to templatize config files; we frequently have JSON or YAML or TOML files that are templatized this way.

However, in Atom, it seems that ERB is not a syntax. Rather, it is explicitly supported as part of the Ruby/Rails syntax. But this is inadequate — ERB is a “super syntax” that can be mixed with any other syntax.

Does Atom have a way to apply multiple syntax highlighters to a file, or perhaps overlay syntax definitions so that ERB can be “mixed into” other syntaxes?


#2

See information on grammar injections: