Elffuss BraidHub

kikocis/continue public

main · 5.5 KiBRawPermalink
1{
2 "comment": "Lua Syntax: version 0.8",
3 "fileTypes": ["lua"],
4 "firstLineMatch": "\\A#!.*?\\blua\\b",
5 "keyEquivalent": "^~L",
6 "name": "Lua",
7 "patterns": [
8 {
9 "captures": {
10 "1": {
11 "name": "keyword.control.lua"
12 },
13 "2": {
14 "name": "entity.name.function.scope.lua"
15 },
16 "3": {
17 "name": "entity.name.function.lua"
18 },
19 "4": {
20 "name": "punctuation.definition.parameters.begin.lua"
21 },
22 "5": {
23 "name": "variable.parameter.function.lua"
24 },
25 "6": {
26 "name": "punctuation.definition.parameters.end.lua"
27 }
28 },
29 "match": "\\b(function)(?:\\s+([a-zA-Z_.:]+[.:])?([a-zA-Z_]\\w*)\\s*)?(\\()([^)]*)(\\))",
30 "name": "meta.function.lua"
31 },
32 {
33 "match": "(?<![\\d.])\\s0x[a-fA-F\\d]+|\\b\\d+(\\.\\d+)?([eE]-?\\d+)?|\\.\\d+([eE]-?\\d+)?",
34 "name": "constant.numeric.lua"
35 },
36 {
37 "begin": "'",
38 "beginCaptures": {
39 "0": {
40 "name": "punctuation.definition.string.begin.lua"
41 }
42 },
43 "end": "'",
44 "endCaptures": {
45 "0": {
46 "name": "punctuation.definition.string.end.lua"
47 }
48 },
49 "name": "string.quoted.single.lua",
50 "patterns": [
51 {
52 "match": "\\\\.",
53 "name": "constant.character.escape.lua"
54 }
55 ]
56 },
57 {
58 "begin": "\"",
59 "beginCaptures": {
60 "0": {
61 "name": "punctuation.definition.string.begin.lua"
62 }
63 },
64 "end": "\"",
65 "endCaptures": {
66 "0": {
67 "name": "punctuation.definition.string.end.lua"
68 }
69 },
70 "name": "string.quoted.double.lua",
71 "patterns": [
72 {
73 "match": "\\\\.",
74 "name": "constant.character.escape.lua"
75 }
76 ]
77 },
78 {
79 "begin": "(?<=\\.cdef)\\s*(\\[(=*)\\[)",
80 "beginCaptures": {
81 "0": {
82 "name": "string.quoted.other.multiline.lua"
83 },
84 "1": {
85 "name": "punctuation.definition.string.begin.lua"
86 }
87 },
88 "contentName": "meta.embedded.lua",
89 "end": "(\\]\\2\\])",
90 "endCaptures": {
91 "0": {
92 "name": "string.quoted.other.multiline.lua"
93 },
94 "1": {
95 "name": "punctuation.definition.string.end.lua"
96 }
97 },
98 "patterns": [
99 {
100 "include": "source.c"
101 }
102 ]
103 },
104 {
105 "begin": "(?<!--)\\[(=*)\\[",
106 "beginCaptures": {
107 "0": {
108 "name": "punctuation.definition.string.begin.lua"
109 }
110 },
111 "end": "\\]\\1\\]",
112 "endCaptures": {
113 "0": {
114 "name": "punctuation.definition.string.end.lua"
115 }
116 },
117 "name": "string.quoted.other.multiline.lua"
118 },
119 {
120 "begin": "--\\[(=*)\\[",
121 "captures": {
122 "0": {
123 "name": "punctuation.definition.comment.lua"
124 }
125 },
126 "end": "\\]\\1\\]",
127 "name": "comment.block.lua"
128 },
129 {
130 "begin": "(^[ \\t]+)?(?=--(?!\\[\\[))",
131 "beginCaptures": {
132 "1": {
133 "name": "punctuation.whitespace.comment.leading.lua"
134 }
135 },
136 "end": "(?!\\G)",
137 "patterns": [
138 {
139 "begin": "--",
140 "beginCaptures": {
141 "0": {
142 "name": "punctuation.definition.comment.lua"
143 }
144 },
145 "end": "\\n",
146 "name": "comment.line.double-dash.lua"
147 }
148 ]
149 },
150 {
151 "match": "\\b(break|do|else|for|if|elseif|return|then|repeat|while|until|end|function|local|in)\\b",
152 "name": "keyword.control.lua"
153 },
154 {
155 "match": "(?<![^.]\\.|:)\\b(false|nil|true|_G|_VERSION|math\\.(pi|huge))\\b|(?<![.])\\.{3}(?!\\.)",
156 "name": "constant.language.lua"
157 },
158 {
159 "match": "(?<![^.]\\.|:)\\b(self)\\b",
160 "name": "variable.language.self.lua"
161 },
162 {
163 "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*(?:[({\"']|\\[\\[))",
164 "name": "support.function.lua"
165 },
166 {
167 "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*(?:[({\"']|\\[\\[))",
168 "name": "support.function.library.lua"
169 },
170 {
171 "match": "\\b(and|or|not)\\b",
172 "name": "keyword.operator.lua"
173 },
174 {
175 "match": "\\b([A-Za-z_]\\w*)\\b(?=\\s*(?:[({\"']|\\[\\[))",
176 "name": "support.function.any-method.lua"
177 },
178 {
179 "match": "(?<=[^.]\\.|:)\\b([A-Za-z_]\\w*)",
180 "name": "variable.other.lua"
181 },
182 {
183 "match": "\\+|-|%|#|\\*|\\/|\\^|==?|~=|<=?|>=?|(?<!\\.)\\.{2}(?!\\.)",
184 "name": "keyword.operator.lua"
185 }
186 ],
187 "scopeName": "source.lua",
188 "uuid": "93E017CC-6F27-11D9-90EB-000D93589AF7",
189 "version": "https://github.com/textmate/lua.tmbundle/commit/609fe340f40b31f4189dabbb38f885b58cf0dd26"
190}