diff options
-rw-r--r-- | manifest.json | 2 | ||||
-rw-r--r-- | plugins/language_rivet.lua | 16 |
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", |