Elffuss BraidHub

kikocis/continue public

c4329554da83 · 4.9 KiBRawPermalink
1{
2 "comment": "Lua Syntax: version 0.8",
3 "fileTypes": [
4 "lua"
5 ],
6 "firstLineMatch": "\\A#!.*?\\blua\\b",
7 "keyEquivalent": "^~L",
8 "name": "Lua",
9 "patterns": [
10 {
11 "captures": {
12 "1": {
13 "name": "keyword.control.lua"
14 },
15 "2": {
16 "name": "entity.name.function.scope.lua"
17 },
18 "3": {
19 "name": "entity.name.function.lua"
20 },
21 "4": {
22 "name": "punctuation.definition.parameters.begin.lua"
23 },
24 "5": {
25 "name": "variable.parameter.function.lua"
26 },
27 "6": {
28 "name": "punctuation.definition.parameters.end.lua"
29 }
30 },
31 "match": "\\b(function)(?:\\s+([a-zA-Z_.:]+[.:])?([a-zA-Z_]\\w*)\\s*)?(\\()([^)]*)(\\))",
32 "name": "meta.function.lua"
33 },
34 {
35 "match": "(?<![\\d.])\\s0x[a-fA-F\\d]+|\\b\\d+(\\.\\d+)?([eE]-?\\d+)?|\\.\\d+([eE]-?\\d+)?",
36 "name": "constant.numeric.lua"
37 },
38 {
39 "begin": "'",
40 "beginCaptures": {
41 "0": {
42 "name": "punctuation.definition.string.begin.lua"
43 }
44 },
45 "end": "'",
46 "endCaptures": {
47 "0": {
48 "name": "punctuation.definition.string.end.lua"
49 }
50 },
51 "name": "string.quoted.single.lua",
52 "patterns": [
53 {
54 "match": "\\\\.",
55 "name": "constant.character.escape.lua"
56 }
57 ]
58 },
59 {
60 "begin": "\"",
61 "beginCaptures": {
62 "0": {
63 "name": "punctuation.definition.string.begin.lua"
64 }
65 },
66 "end": "\"",
67 "endCaptures": {
68 "0": {
69 "name": "punctuation.definition.string.end.lua"
70 }
71 },
72 "name": "string.quoted.double.lua",
73 "patterns": [
74 {
75 "match": "\\\\.",
76 "name": "constant.character.escape.lua"
77 }
78 ]
79 },
80 {
81 "begin": "(?<=\\.cdef)\\s*(\\[(=*)\\[)",
82 "beginCaptures": {
83 "0": {
84 "name": "string.quoted.other.multiline.lua"
85 },
86 "1": {
87 "name": "punctuation.definition.string.begin.lua"
88 }
89 },
90 "contentName": "meta.embedded.lua",
91 "end": "(\\]\\2\\])",
92 "endCaptures": {
93 "0": {
94 "name": "string.quoted.other.multiline.lua"
95 },
96 "1": {
97 "name": "punctuation.definition.string.end.lua"
98 }
99 },
100 "patterns": [
101 {
102 "include": "source.c"
103 }
104 ]
105 },
106 {
107 "begin": "(?<!--)\\[(=*)\\[",
108 "beginCaptures": {
109 "0": {
110 "name": "punctuation.definition.string.begin.lua"
111 }
112 },
113 "end": "\\]\\1\\]",
114 "endCaptures": {
115 "0": {
116 "name": "punctuation.definition.string.end.lua"
117 }
118 },
119 "name": "string.quoted.other.multiline.lua"
120 },
121 {
122 "begin": "--\\[(=*)\\[",
123 "captures": {
124 "0": {
125 "name": "punctuation.definition.comment.lua"
126 }
127 },
128 "end": "\\]\\1\\]",
129 "name": "comment.block.lua"
130 },
131 {
132 "begin": "(^[ \\t]+)?(?=--(?!\\[\\[))",
133 "beginCaptures": {
134 "1": {
135 "name": "punctuation.whitespace.comment.leading.lua"
136 }
137 },
138 "end": "(?!\\G)",
139 "patterns": [
140 {
141 "begin": "--",
142 "beginCaptures": {
143 "0": {
144 "name": "punctuation.definition.comment.lua"
145 }
146 },
147 "end": "\\n",
148 "name": "comment.line.double-dash.lua"
149 }
150 ]
151 },
152 {
153 "match": "\\b(break|do|else|for|if|elseif|return|then|repeat|while|until|end|function|local|in)\\b",
154 "name": "keyword.control.lua"
155 },
156 {
157 "match": "(?<![^.]\\.|:)\\b(false|nil|true|_G|_VERSION|math\\.(pi|huge))\\b|(?<![.])\\.{3}(?!\\.)",
158 "name": "constant.language.lua"
159 },
160 {
161 "match": "(?<![^.]\\.|:)\\b(self)\\b",
162 "name": "variable.language.self.lua"
163 },
164 {
165 "match": "(?<![^.]\\.|:)\\b(assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|loadfile|loadstring|module|next|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\\b(?=\\s*(?:[({\"']|\\[\\[))",
166 "name": "support.function.lua"
167 },
168 {
169 "match": "(?<![^.]\\.|:)\\b(coroutine\\.(create|resume|running|status|wrap|yield)|string\\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)|table\\.(concat|insert|maxn|remove|sort)|math\\.(abs|acos|asin|atan2?|ceil|cosh?|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pow|rad|random|randomseed|sinh?|sqrt|tanh?)|io\\.(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)|os\\.(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\\.(cpath|loaded|loadlib|path|preload|seeall)|debug\\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|traceback))\\b(?=\\s*(?:[({\"']|\\[\\[))",
170 "name": "support.function.library.lua"
171 },
172 {
173 "match": "\\b(and|or|not)\\b",
174 "name": "keyword.operator.lua"
175 },
176 {
177 "match": "\\b([A-Za-z_]\\w*)\\b(?=\\s*(?:[({\"']|\\[\\[))",
178 "name": "support.function.any-method.lua"
179 },
180 {
181 "match": "(?<=[^.]\\.|:)\\b([A-Za-z_]\\w*)",
182 "name": "variable.other.lua"
183 },
184 {
185 "match": "\\+|-|%|#|\\*|\\/|\\^|==?|~=|<=?|>=?|(?<!\\.)\\.{2}(?!\\.)",
186 "name": "keyword.operator.lua"
187 }
188 ],
189 "scopeName": "source.lua",
190 "uuid": "93E017CC-6F27-11D9-90EB-000D93589AF7",
191 "version": "https://github.com/textmate/lua.tmbundle/commit/609fe340f40b31f4189dabbb38f885b58cf0dd26"
192}