Skip to content

Commit

Permalink
update language_rivet.lua (#340)
Browse files Browse the repository at this point in the history
* Update manifest.json

* Update manifest.json

* Update language_rivet.lua

* fix: update language_rivet.lua
  • Loading branch information
StunxFS authored Nov 12, 2023
1 parent 0c0aa76 commit 3cd8021
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@
},
{
"description": "Syntax for the [Rivet](https://github.com/rivet-lang/rivet) programming language",
"version": "0.4.2",
"version": "0.4.3",
"path": "plugins/language_rivet.lua",
"id": "language_rivet",
"mod_version": "3",
Expand Down
11 changes: 6 additions & 5 deletions plugins/language_rivet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ syntax.add {
},
{pattern = "[A-Z][%w_]*", type = "keyword2"}, -- types
{pattern = "%@%s?[%a_][%w_]*", type = "literal"}, -- builtin func/var
-- `defer` modes
{pattern = "defer%s?%(%s?()[%a_][%w_]*()%s?%)", type = {"keyword", "comment", "normal"} },
{pattern = "[%a_][%w_]*%f[(]", type = "function"},
{pattern = "#%s?[%a_][%w_]*", type = "comment"}, -- if/else_if/else/endif
{pattern = "#%s?.*", type = "keyword2"}, -- attributes
{pattern = "#%s?%[.*%]", type = "keyword2"}, -- attributes
{pattern = "[%a_][%w_]*", type = "symbol"}
},
symbols = {
Expand All @@ -47,7 +49,6 @@ syntax.add {
["defer"] = "keyword",
["else"] = "keyword",
["enum"] = "keyword",
["errdefer"] = "keyword",
["extend"] = "keyword",
["extern"] = "keyword",
["func"] = "keyword",
Expand All @@ -57,13 +58,13 @@ syntax.add {
["import"] = "keyword",
["in"] = "keyword",
["is"] = "keyword",
["match"] = "keyword",
["mut"] = "keyword",
["or"] = "keyword",
["public"] = "keyword",
["return"] = "keyword",
["static"] = "keyword",
["struct"] = "keyword",
["switch"] = "keyword",
["test"] = "keyword",
["throw"] = "keyword",
["trait"] = "keyword",
Expand All @@ -82,16 +83,16 @@ syntax.add {
["bool"] = "keyword2",
["comptime_int"] = "keyword2",
["comptime_float"] = "keyword2",
["int"] = "keyword2",
["int8"] = "keyword2",
["int16"] = "keyword2",
["int32"] = "keyword2",
["int64"] = "keyword2",
["isize"] = "keyword2",
["uint"] = "keyword2",
["uint8"] = "keyword2",
["uint16"] = "keyword2",
["uint32"] = "keyword2",
["uint64"] = "keyword2",
["usize"] = "keyword2",
["float32"] = "keyword2",
["float64"] = "keyword2",
["rawptr"] = "keyword2",
Expand Down

0 comments on commit 3cd8021

Please sign in to comment.