aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Mendoza <56417208+StunxFS@users.noreply.github.com>2023-12-27 16:39:55 -0400
committerGitHub <noreply@github.com>2023-12-27 21:39:55 +0100
commit5ff5846cea7602c763bd949e89324e550435c1a9 (patch)
treee35336015723ab43a13d610cd024db20150ac89a
parent8df9ff1557ac582b2429e778bba85a5442e7be5e (diff)
downloadlite-xl-plugins-5ff5846cea7602c763bd949e89324e550435c1a9.tar.gz
lite-xl-plugins-5ff5846cea7602c763bd949e89324e550435c1a9.zip
Update `language_rivet.lua` (#348)
* Update language_rivet.lua * Update manifest.json
-rw-r--r--manifest.json2
-rw-r--r--plugins/language_rivet.lua16
2 files changed, 9 insertions, 9 deletions
diff --git a/manifest.json b/manifest.json
index 88b9d80..9808109 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1099,7 +1099,7 @@
},
{
"description": "Syntax for the [Rivet](https://github.com/rivet-lang/rivet) programming language",
- "version": "0.4.4",
+ "version": "0.4.5",
"path": "plugins/language_rivet.lua",
"id": "language_rivet",
"mod_version": "3",
diff --git a/plugins/language_rivet.lua b/plugins/language_rivet.lua
index 18b4e45..7db2db2 100644
--- a/plugins/language_rivet.lua
+++ b/plugins/language_rivet.lua
@@ -28,22 +28,24 @@ syntax.add {
pattern = "_?%u[%u_][%u%d_]*%f[%s%+%*%-%.%)%]}%?%^%%=/<>~|&;:,!]",
type = "literal"
},
- {pattern = "[A-Z][%w_]*", type = "keyword2"}, -- types
- {pattern = "%@%s?[%a_][%w_]*", type = "literal"}, -- builtin func/var
+ -- types
+ {pattern = "[A-Z][%w_]*", type = "keyword2"},
+ -- builtin func/var
+ {pattern = "%@%s?[%a_][%w_]*", type = "literal"},
-- `defer` modes
{pattern = "defer%s?%(%s?()[%a_][%w_]*()%s?%)", type = {"keyword", "comment", "normal"} },
+ -- functions
{pattern = "[%a_][%w_]*%f[(]", type = "function"},
- {pattern = "#%s?[%a_][%w_]*", type = "comment"}, -- if/else_if/else/endif
- {pattern = "#%s?%[.*%]", type = "keyword2"}, -- attributes
+ -- attributes
+ {pattern = "#%s?%[.*%]", type = "keyword2"},
+ -- symbols
{pattern = "[%a_][%w_]*", type = "symbol"}
},
symbols = {
["alias"] = "keyword",
- ["and"] = "keyword",
["as"] = "keyword",
["break"] = "keyword",
["catch"] = "keyword",
- ["comptime"] = "keyword",
["const"] = "keyword",
["continue"] = "keyword",
["defer"] = "keyword",
@@ -53,14 +55,12 @@ syntax.add {
["extern"] = "keyword",
["func"] = "keyword",
["for"] = "keyword",
- ["from"] = "keyword",
["if"] = "keyword",
["import"] = "keyword",
["in"] = "keyword",
["is"] = "keyword",
["match"] = "keyword",
["mut"] = "keyword",
- ["or"] = "keyword",
["pub"] = "keyword",
["return"] = "keyword",
["struct"] = "keyword",