From 5ff5846cea7602c763bd949e89324e550435c1a9 Mon Sep 17 00:00:00 2001 From: Jose Mendoza <56417208+StunxFS@users.noreply.github.com> Date: Wed, 27 Dec 2023 16:39:55 -0400 Subject: Update `language_rivet.lua` (#348) * Update language_rivet.lua * Update manifest.json --- plugins/language_rivet.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'plugins') 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", -- cgit v1.2.3