summaryrefslogtreecommitdiff
path: root/syntaxes
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-05-05 17:06:21 +0800
committersumneko <sumneko@hotmail.com>2019-05-05 17:06:21 +0800
commit0462a7a8d142019b3679b220a1285c9055da96b5 (patch)
treebe79867257d891629f46a9b0b3d1d588203c6c23 /syntaxes
parent88f01fcd1ac3404c59c2dd3ad4e266708731b994 (diff)
downloadlua-language-server-0462a7a8d142019b3679b220a1285c9055da96b5.zip
先还原着色吧
Diffstat (limited to 'syntaxes')
-rw-r--r--syntaxes/lua.tmLanguage.json39
1 files changed, 11 insertions, 28 deletions
diff --git a/syntaxes/lua.tmLanguage.json b/syntaxes/lua.tmLanguage.json
index d8353c1c..d5ac4a98 100644
--- a/syntaxes/lua.tmLanguage.json
+++ b/syntaxes/lua.tmLanguage.json
@@ -12,36 +12,19 @@
"name": "keyword.control.lua"
}
},
- "end": "(?=\\)|\\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|in|local|function)\\b)",
+ "end": "(?=(\\()(?:[^\\)]*)(\\)))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.parameters.begin.lua"
+ },
+ "2": {
+ "name": "punctuation.definition.parameters.finish.lua"
+ }
+ },
"name": "meta.function.lua",
"patterns": [
{
- "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*(?=:)",
+ "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*:)",
"name": "entity.name.class.lua"
},
{
@@ -233,7 +216,7 @@
"name": "keyword.control.lua"
},
{
- "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}(?!\\.)",
+ "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"
},
{