summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--syntaxes/lua.tmLanguage.json10
1 files changed, 7 insertions, 3 deletions
diff --git a/syntaxes/lua.tmLanguage.json b/syntaxes/lua.tmLanguage.json
index f1bdf110..a8d9eabf 100644
--- a/syntaxes/lua.tmLanguage.json
+++ b/syntaxes/lua.tmLanguage.json
@@ -234,11 +234,15 @@
"name": "keyword.operator.lua"
},
{
- "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
- "name": "variable.other.lua"
+ "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*(?:[({\"']|\\[\\[))",
+ "name": "entity.name.function.lua"
},
{
- "match": "(?<=[^.]\\.|:)\\b([a-zA-Z_][a-zA-Z0-9_]*)",
+ "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*:)",
+ "name": "entity.name.class.lua"
+ },
+ {
+ "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
"name": "variable.other.lua"
},
{