aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_wren.lua
diff options
context:
space:
mode:
authorThaCuber <70547062+ThaCuber@users.noreply.github.com>2023-01-22 15:34:37 -0400
committerGitHub <noreply@github.com>2023-01-22 14:34:37 -0500
commitd7ad7c0e3fecaf2c837c1017b385ddef0721911b (patch)
tree41f87b43122707283e280785ccfc1ea19f574ed5 /plugins/language_wren.lua
parentc7fa2c2a93a342c2c5bb119b117d4f7ba24cab47 (diff)
downloadlite-xl-plugins-d7ad7c0e3fecaf2c837c1017b385ddef0721911b.tar.gz
lite-xl-plugins-d7ad7c0e3fecaf2c837c1017b385ddef0721911b.zip
Added annotations to language_wren.lua (#175)
* Added annotations to language_wren.lua * sneaked in Fn.new being highlighted as a literal also fixed file formatting, looks less ugly now
Diffstat (limited to 'plugins/language_wren.lua')
-rw-r--r--plugins/language_wren.lua34
1 files changed, 18 insertions, 16 deletions
diff --git a/plugins/language_wren.lua b/plugins/language_wren.lua
index 593cd46..35b8b8a 100644
--- a/plugins/language_wren.lua
+++ b/plugins/language_wren.lua
@@ -7,23 +7,25 @@ syntax.add {
comment = "//",
block_comment = {"/*", "*/"},
patterns = {
- { pattern = "//.-\n", type = "comment" },
- { pattern = { "/%*", "%*/" }, type = "comment" },
- { pattern = { '"', '"', '\\' }, type = "string" },
- { pattern = "%d+%.%d+[Ee]%d+", type = "number" },
- { pattern = "%d+%.%d+", type = "number" },
- { pattern = "%d+[Ee]%d+", type = "number" },
- { pattern = "0x%x+", type = "number" },
- { pattern = "%d+", type = "number" },
- { pattern = "%.%.%.?", type = "operator" },
- { pattern = "[<>!=]=", type = "operator" },
- { pattern = "|[^|]+|%s+", type = "string" },
- { pattern = "[%+%-=/%*%^%%<>!~|&?:]", type = "operator" },
- { pattern = "_[%w_]*", type = "keyword2" },
+ { pattern = "//.-\n", type = "comment" },
+ { pattern = { "/%*", "%*/" }, type = "comment" },
+ { pattern = { '"', '"', '\\' }, type = "string" },
+ { pattern = "%d+%.%d+[Ee]%d+", type = "number" },
+ { pattern = "%d+%.%d+", type = "number" },
+ { pattern = "%d+[Ee]%d+", type = "number" },
+ { pattern = "0x%x+", type = "number" },
+ { pattern = "%d+", type = "number" },
+ { pattern = "%.%.%.?", type = "operator" },
+ { pattern = "[<>!=]=", type = "operator" },
+ { pattern = "|[^|]+|%s+", type = "string" },
+ { pattern = "[%+%-=/%*%^%%<>!~|&?:]", type = "operator" },
+ { pattern = "_[%w_]*", type = "keyword2" },
+ { regex = [[\bFn.new\b]], type = "literal" },
+ { pattern = "#!?%a[%w_]*%s*%(?[%w _,\"=]*%)?", type = "comment" },
{ pattern = "%a[%w_]*()%s+()is()%s+%a[%w_]*%s*%f[{]", type = {"function", "normal", "keyword", "normal"}},
- { pattern = "%a[%w_]*%s*=()%s*%f[(]", type = {"function", "normal"} },
- { pattern = "%a[%w_]*()%s*%f[({]", type = {"function", "normal"} },
- { pattern = "%a[%w_]+", type = "symbol" },
+ { pattern = "%a[%w_]*%s*=()%s*%f[(]", type = {"function", "normal"} },
+ { pattern = "%a[%w_]*()%s*%f[({]", type = {"function", "normal"} },
+ { pattern = "%a[%w_]+", type = "symbol" },
},
symbols = {
["break"] = "keyword",