]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/jinja2.yaml
Merge pull request #1415 from dullbananas/master
[micro.git] / runtime / syntax / jinja2.yaml
1 filetype: jinja2
2
3 detect:
4     filename: "\\.html$"
5
6 rules:
7   - include: "html"
8   - special: "({{|}}|{%-?|-?%})"
9   - default:
10         start: "({%-?|{{)"
11         end: "(-?%}|}})"
12         limit-group: special
13         rules:
14           - include: "python"
15           - statement: "\\b(ignore missing|with(out)? context|block|call|endblock|endcall|endfilter|endfor|endmacro|endraw|endset|extends|filter|for|include|macro|raw|recursive|scoped|set)\\b"
16           - identifier.builtinfunc: "\\b(attr|batch|capitalize|center|count|d|default|dictsort|e|escape|filesizeformat|first|forceescape|groupby|indent|join|last|length|lower|pprint|random|reject|rejectattr|replace|reverse|safe|select|selectattr|striptags|title|tojson|trim|truncate|unique|upper|urlencode|urlize|wordcount|wordwrap|xmlattr)\\b"
17           - identifier.builtintest: "\\b(callable|defined|divisibleby|eq|equalto|escaped|even|ge|gt|iterable|le|lower|lt|mapping|ne|none|number|odd|sameas|sequence|string|undefined|upper)\\b"
18           - identifier.defaultglobal: "\\b(lipsum|cycler|joiner|namespace)\\b"
19   - comment:
20         start: "{#"
21         end: "#}"
22         rules: []