forked from aubm/jetbrains-live-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Twig.xml
87 lines (86 loc) · 4.63 KB
/
Twig.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?xml version="1.0" encoding="UTF-8"?>
<templateSet group="Twig">
<template name="set" value="{% set $NAME$ = $VALUE$ %}$END$" description="{% set foo = '' %}" toReformat="true" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="VALUE" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
</context>
</template>
<template name="filter" value="{% filter $NAME$ %} $END$ {% endfilter %}" description="{% filter foo %} ... {% endfilter %}" toReformat="true" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="OTHER" value="false" />
</context>
</template>
<template name="for" value="{% for $ELEMENT$ in $ARRAY$ %} $END$ {% endfor %}" description="{% for i in range() %} ... {% endfor %}" toReformat="true" toShortenFQNames="true">
<variable name="ELEMENT" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="ARRAY" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
</context>
</template>
<template name="if" value="{% if $COND$ %} $END$ {% endif %}" description="{% if expression %} ... {% endif %}" toReformat="true" toShortenFQNames="true">
<variable name="COND" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
</context>
</template>
<template name="include" value="{% include '$FILE$' %}$END$" description="{% include '..' %}" toReformat="true" toShortenFQNames="true">
<variable name="FILE" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
</context>
</template>
<template name="block" value="{% block $NAME$ %} $END$ {% endblock %}" description="{% block name %}...{% endblock %}" toReformat="true" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
</context>
</template>
<template name="extends" value="{% extends '$PARENT$' %} $END$" description="{% extends 'layout.twig' %}" toReformat="true" toShortenFQNames="true">
<variable name="PARENT" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
</context>
</template>
<template name="macro" value="{% macro $NAME$($ARGS$) %} $END$ {% endmacro %}" description="{% macro name(args) %}...{% endmacro %}" toReformat="true" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="ARGS" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
</context>
</template>
<template name="import" value="{% import '$FILE$' as $ALIAS$ %} $END$" description="{% import '....twig' as alias %}" toReformat="true" toShortenFQNames="true">
<variable name="FILE" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="ALIAS" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
</context>
</template>
<template name="from" value="{% from '$FILE$' import $ELEMENT$ as $ALIAS$ %} $END$" description="{% from '....twig' import input as input_field %}" toReformat="true" toShortenFQNames="true">
<variable name="FILE" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="ELEMENT" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="ALIAS" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
</context>
</template>
<template name="spaceless" value="{% spaceless %} $END$ {% endspaceless %}" description="{% spaceless %}...{% endspaceless %}" toReformat="true" toShortenFQNames="true">
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
</context>
</template>
</templateSet>