greplytix / Hamlbars

Sublime Text 3 Syntax highlighting for .hamlbars files which is a combination of both Haml and Handlebars
MIT License
2 stars 0 forks source link

Differentiate color between conditionals and function calls #34

Closed ghost closed 9 years ago

ghost commented 9 years ago

[DOCUMENTATION]

Scopes of Function Calls and Conditionals

The following items have multiple scopes applied to them in order. These scopes are delimited by spaces. The last scope listed takes precedence over all others. Thus, cross-sections of the most precedent scope dictate necessary changes to regex in the tmLanguage file so that certain items can be differentiated from one another.

Function calls have these scopes:

source.hamlbars meta.function.inline.other.hamlbars variable.parameter.hamlbars

Conditional variables have these scopes:

source.hamlbars meta.function.block.start.hamlbars variable.parameter.hamlbars

Conditional logic has these scopes:

Beginning logical expression:

source.hamlbars meta.function.block.start.hamlbars support.constant.hamlbars

Ending logical expression:

source.hamlbars meta.function.block.end.hamlbars support.constant.hamlbars

Else:

(Else is kind of a 'middle' logical expression. My presumption is that it's not differentiating because it's not prepended by a # or /.)

source.hamlbars meta.function.inline.other.hamlbars variable.parameter.hamlbars