summaryrefslogtreecommitdiff
path: root/syntaxes/lua.tmLanguage.json
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-05-05 17:32:32 +0800
committersumneko <sumneko@hotmail.com>2019-05-05 17:32:32 +0800
commit43ba531f175af9eeb4791e4f0a14562cc452583a (patch)
tree4d78e97a50164151b479214156402e0acb2f793d /syntaxes/lua.tmLanguage.json
parent0462a7a8d142019b3679b220a1285c9055da96b5 (diff)
downloadlua-language-server-43ba531f175af9eeb4791e4f0a14562cc452583a.zip
应该这样
Diffstat (limited to 'syntaxes/lua.tmLanguage.json')
-rw-r--r--syntaxes/lua.tmLanguage.json39
1 files changed, 28 insertions, 11 deletions
diff --git a/syntaxes/lua.tmLanguage.json b/syntaxes/lua.tmLanguage.json
index d5ac4a98..2bdf90e7 100644
--- a/syntaxes/lua.tmLanguage.json
+++ b/syntaxes/lua.tmLanguage.json
@@ -12,19 +12,36 @@
"name": "keyword.control.lua"
}
},
- "end": "(?=(\\()(?:[^\\)]*)(\\)))",
- "endCaptures": {
- "1": {
- "name": "punctuation.definition.parameters.begin.lua"
- },
- "2": {
- "name": "punctuation.definition.parameters.finish.lua"
- }
- },
+ "end": "(?=\\)|\\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|in|local|function)\\b)",
"name": "meta.function.lua",
"patterns": [
{
- "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*:)",
+ "begin": "(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.parameters.begin.lua"
+ }
+ },
+ "end": "(?=\\))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.parameters.finish.lua"
+ }
+ },
+ "name": "meta.parameter.lua",
+ "patterns": [
+ {
+ "match": "[a-zA-Z_][a-zA-Z0-9_]*",
+ "name": "variable.parameter.function.lua"
+ },
+ {
+ "match": ",",
+ "name": "punctuation.separator.arguments.lua"
+ }
+ ]
+ },
+ {
+ "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=:)",
"name": "entity.name.class.lua"
},
{
@@ -216,7 +233,7 @@
"name": "keyword.control.lua"
},
{
- "match": "(?<![^.]\\.|:)\\b(false|nil|true|_G|_VERSION|math\\.(pi|huge)|utf8\\.charpattern|io\\.(stdin|stdout|stderr)|package\\.(cpath|loaded|path|preload|searchers))\\b|(?<![.])\\.{3}(?!\\.)",
+ "match": "(?<![^.]\\.|:)\\b(false|nil|true|_G|_VERSION|math\\.(pi|huge)|utf8\\.charpattern|io\\.(stdin|stdout|stderr)|package\\.(cpath|loaded|loaders|path|preload|searchers))\\b|(?<![.])\\.{3}(?!\\.)",
"name": "constant.language.lua"
},
{