atom / language-puppet

Puppet package for Atom
Other
36 stars 31 forks source link

Don't treat epp files as Puppet code #39

Closed alexjurkiewicz closed 8 years ago

alexjurkiewicz commented 8 years ago

The ERB grammar is fine to be used for EPP, but I'm not sure how to create an 'EPP' grammar that simply inherits from ERB. At least plain text syntax is better than incorrect language.

50Wliu commented 8 years ago

/cc @saqibnaveed

alexjurkiewicz commented 8 years ago

So here are the docs on EPP syntax: https://docs.puppet.com/puppet/4.5/reference/lang_template_epp.html

tl;dr, within the following tags may be puppet code:

Templates are generally configuration files for other programs, so highlighting things outside these tags (or highlighting the tags incorrectly) get confusing fast. Here's an example from the above docs link using Puppet syntax highlighting (the current behaviour): screen shot 2016-08-08 at 3 23 25 pm

And here it is using ERB syntax: screen shot 2016-08-08 at 3 24 26 pm

EPP contains several incompatibilities from ERB, but it's 90% overlap and there are no egregious mis-highlights (unlike Puppet syntax, which will spuriously highlight $variable outside EPP tags.

Long term I'd like an EPP syntax, but until then I'd rather ERB highlighting to plain text to Puppet highlighting.

50Wliu commented 8 years ago

Agreed. Thanks @alexjurkiewicz.

alexjurkiewicz commented 8 years ago

thanks for your help!