summaryrefslogtreecommitdiff
path: root/syntaxes
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-06-04 11:32:37 +0800
committersumneko <sumneko@hotmail.com>2019-06-04 11:32:37 +0800
commitf40f091d2c09adf317e3684bcf9d2b53c0585c95 (patch)
tree4e69dd4bddc6968968274e374564e8f2dc18adb6 /syntaxes
parent7013b50fa17c09fb9b56420ded6b9545c50e5772 (diff)
downloadlua-language-server-f40f091d2c09adf317e3684bcf9d2b53c0585c95.zip
include天下无敌
Diffstat (limited to 'syntaxes')
-rw-r--r--syntaxes/lua.tmLanguage.json96
1 files changed, 56 insertions, 40 deletions
diff --git a/syntaxes/lua.tmLanguage.json b/syntaxes/lua.tmLanguage.json
index 203603d5..7194cca5 100644
--- a/syntaxes/lua.tmLanguage.json
+++ b/syntaxes/lua.tmLanguage.json
@@ -16,13 +16,16 @@
"name": "meta.function.lua",
"patterns": [
{
+ "include": "#comment"
+ },
+ {
"begin": "(\\()",
"beginCaptures": {
"1": {
"name": "punctuation.definition.parameters.begin.lua"
}
},
- "end": "(?!.)",
+ "end": "(\\))|(?!.)",
"endCaptures": {
"1": {
"name": "punctuation.definition.parameters.finish.lua"
@@ -31,6 +34,9 @@
"name": "meta.parameter.lua",
"patterns": [
{
+ "include": "#comment"
+ },
+ {
"match": "[a-zA-Z_][a-zA-Z0-9_]*",
"name": "variable.parameter.function.lua"
},
@@ -157,45 +163,7 @@
"name": "comment.line.shebang.lua"
},
{
- "begin": "(^[ \\t]+)?(?=--)",
- "beginCaptures": {
- "1": {
- "name": "punctuation.whitespace.comment.leading.lua"
- }
- },
- "end": "(?!\\G)((?!^)[ \\t]+\\n)?",
- "endCaptures": {
- "1": {
- "name": "punctuation.whitespace.comment.trailing.lua"
- }
- },
- "patterns": [
- {
- "begin": "--\\[(=*)\\[",
- "beginCaptures": {
- "0": {
- "name": "punctuation.definition.comment.begin.lua"
- }
- },
- "end": "\\]\\1\\]",
- "endCaptures": {
- "0": {
- "name": "punctuation.definition.comment.end.lua"
- }
- },
- "name": "comment.block.lua"
- },
- {
- "begin": "--",
- "beginCaptures": {
- "0": {
- "name": "punctuation.definition.comment.lua"
- }
- },
- "end": "\\n",
- "name": "comment.line.double-dash.lua"
- }
- ]
+ "include": "#comment"
},
{
"captures": {
@@ -233,6 +201,9 @@
"end": "(?=[a-zA-Z_=])",
"patterns": [
{
+ "include": "#comment"
+ },
+ {
"match": "<\\s*([a-zA-Z_][a-zA-Z0-9_]*)",
"captures": {
"1": {
@@ -307,6 +278,51 @@
"name": "invalid.illegal.character.escape.lua"
}
]
+ },
+ "comment": {
+ "patterns": [
+ {
+ "begin": "(^[ \\t]+)?(?=--)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.whitespace.comment.leading.lua"
+ }
+ },
+ "end": "(?!\\G)((?!^)[ \\t]+\\n)?",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.whitespace.comment.trailing.lua"
+ }
+ },
+ "patterns": [
+ {
+ "begin": "--\\[(=*)\\[",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.begin.lua"
+ }
+ },
+ "end": "\\]\\1\\]",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.end.lua"
+ }
+ },
+ "name": "comment.block.lua"
+ },
+ {
+ "begin": "--",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.lua"
+ }
+ },
+ "end": "\\n",
+ "name": "comment.line.double-dash.lua"
+ }
+ ]
+ }
+ ]
}
}
}