summaryrefslogtreecommitdiff
path: root/syntaxes/lua.tmLanguage.json
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-26 15:33:24 +0800
committersumneko <sumneko@hotmail.com>2019-04-26 15:33:24 +0800
commit19165de37e77efa57c022414ae4bc756914a402b (patch)
treefdaf05ba90368a0e1c4d90469f68450b2e2a7c35 /syntaxes/lua.tmLanguage.json
parent6d4d2e1c1c4a6acb1bf64f60c1424758cc5d5b68 (diff)
downloadlua-language-server-19165de37e77efa57c022414ae4bc756914a402b.zip
close #18 自己实现语法着色
Diffstat (limited to 'syntaxes/lua.tmLanguage.json')
-rw-r--r--syntaxes/lua.tmLanguage.json20
1 files changed, 10 insertions, 10 deletions
diff --git a/syntaxes/lua.tmLanguage.json b/syntaxes/lua.tmLanguage.json
index c9404048..573259fb 100644
--- a/syntaxes/lua.tmLanguage.json
+++ b/syntaxes/lua.tmLanguage.json
@@ -192,7 +192,7 @@
"name": "keyword.control.goto.lua"
},
"2": {
- "name": "constant.other.placeholder.lua"
+ "name": "string.tag.lua"
}
},
"match": "\\b(goto)\\s+([a-zA-Z_][a-zA-Z0-9_]*)"
@@ -200,21 +200,21 @@
{
"captures": {
"1": {
- "name": "punctuation.definition.label.begin.lua"
+ "name": "punctuation.section.embedded.begin.lua"
},
"2": {
- "name": "punctuation.definition.label.end.lua"
+ "name": "punctuation.section.embedded.end.lua"
}
},
- "match": "(::)[a-zA-Z_][a-zA-Z0-9_]*(::)",
- "name": "constant.other.placeholder.lua"
+ "match": "(::)\\s*[a-zA-Z_][a-zA-Z0-9_]*\\s*(::)",
+ "name": "string.tag.lua"
},
{
"match": "\\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|function|local(\\s*\\*toclose)?|in)\\b",
"name": "keyword.control.lua"
},
{
- "match": "(?<![^.]\\.|:)\\b(false|nil|true|_G|_VERSION|math\\.(pi|huge))\\b|(?<![.])\\.{3}(?!\\.)",
+ "match": "(?<![^.]\\.|:)\\b(false|nil|true|_G|_VERSION|math\\.(pi|huge)|utf8\\.charpattern|io\\.(stdin|stdout|stderr)|package\\.(cpath|loaded|path|preload|searchers))\\b|(?<![.])\\.{3}(?!\\.)",
"name": "constant.language.lua"
},
{
@@ -222,11 +222,11 @@
"name": "variable.language.self.lua"
},
{
- "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*(?:[({\"']|\\[\\[))",
+ "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",
"name": "support.function.lua"
},
{
- "match": "(?<![^.]\\.|:)\\b(coroutine\\.(create|isyieldable|kill|resume|running|status|wrap|yield)|string\\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)|table\\.(concat|insert|maxn|move|pack|remove|sort|unpack)|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|searchers|searchpath)|debug\\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|traceback|upvalueid|upvaluejoin)|bit32\\.(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)|utf8\\.(char|charpattern|codes|codepoint|len|offset))\\b(?=\\s*(?:[({\"']|\\[\\[))",
+ "match": "(?<![^.]\\.|:)\\b(coroutine\\.(create|isyieldable|kill|resume|running|status|wrap|yield)|string\\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)|table\\.(concat|insert|maxn|move|pack|remove|sort|unpack)|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\\.(loadlib|seeall|searchpath)|debug\\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|traceback|upvalueid|upvaluejoin)|bit32\\.(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)|utf8\\.(char|codes|codepoint|len|offset))\\b",
"name": "support.function.library.lua"
},
{
@@ -234,8 +234,8 @@
"name": "keyword.operator.lua"
},
{
- "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*(?:[({\"']|\\[\\[))",
- "name": "support.function.any-method.lua"
+ "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
+ "name": "variable.other.lua"
},
{
"match": "(?<=[^.]\\.|:)\\b([a-zA-Z_][a-zA-Z0-9_]*)",