summaryrefslogtreecommitdiff
path: root/luasnip_snippets/mako.json
blob: fb08ff983867ff809da1d19d254a86e0de0855be (plain)
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
  "def": {
    "prefix": "def",
    "description": "definition",
    "body": [
      "<%def name=\"${1:name}\">",
      "\t${2:}",
      "</%def>"
    ],
    "luasnip": {
      "priority": -50
    }
  },
  "call": {
    "prefix": "call",
    "description": "call",
    "body": [
      "<%call expr=\"${1:name}\">",
      "\t${2:}",
      "</%call>"
    ]
  },
  "doc": {
    "prefix": "doc",
    "description": "doc",
    "body": [
      "<%doc>",
      "\t${1:}",
      "</%doc>"
    ]
  },
  "text": {
    "prefix": "text",
    "description": "text",
    "body": [
      "<%text>",
      "\t${1:}",
      "</%text>"
    ]
  },
  "for": {
    "prefix": "for",
    "description": "for",
    "body": [
      "% for ${1:i} in ${2:iter}:",
      "\t${3:}",
      "% endfor"
    ]
  },
  "if": {
    "prefix": "if",
    "description": "if/else",
    "body": [
      "% if ${1:condition}:",
      "\t${2:}",
      "% else:",
      "\t${3:}",
      "% endif"
    ]
  },
  "try": {
    "prefix": "try",
    "description": "try",
    "body": [
      "% try:",
      "\t${1:}",
      "% except${2:}:",
      "\t${3:pass}",
      "% endtry"
    ]
  },
  "wh": {
    "prefix": "wh",
    "description": "wh",
    "body": [
      "% while ${1:}:",
      "\t${2:}",
      "% endwhile"
    ]
  },
  "$": {
    "prefix": "$",
    "description": "$",
    "body": "\\${${1:}\\}"
  },
  "<%": {
    "prefix": "<%",
    "description": "<%",
    "body": "<% ${1:} %>"
  },
  "<!%": {
    "prefix": "<!%",
    "description": "<!%",
    "body": "<!% ${1:} %>"
  },
  "inherit": {
    "prefix": "inherit",
    "description": "inherit",
    "body": "<%inherit file=\"${1:filename}\" />"
  },
  "include": {
    "prefix": "include",
    "description": "include",
    "body": "<%include file=\"${1:filename}\" />"
  },
  "namespace": {
    "prefix": "namespace",
    "description": "namespace",
    "body": "<%namespace file=\"${1:name}\" />"
  },
  "page": {
    "prefix": "page",
    "description": "page",
    "body": "<%page args=\"${1:}\" />"
  }
}