diff options
author | Guldoman <giulio.lettieri@gmail.com> | 2022-07-08 18:52:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-08 18:52:03 +0200 |
commit | 8ccb529a4df696cddcdc2b114cd7c05a8ce17e93 (patch) | |
tree | 712f79bef9a92d7095979667293b1de0dddfd1c4 | |
parent | 3303e1e397a213004d2b57c893c496e98fe637f4 (diff) | |
parent | 931bba04476372990e486c8f395cfccf6a5bb519 (diff) | |
download | lite-xl-plugins-8ccb529a4df696cddcdc2b114cd7c05a8ce17e93.tar.gz lite-xl-plugins-8ccb529a4df696cddcdc2b114cd7c05a8ce17e93.zip |
Merge pull request #115 from StunxFS/master
Update language_rivet.lua
-rw-r--r-- | plugins/language_rivet.lua | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/language_rivet.lua b/plugins/language_rivet.lua index cf203b1..eaed9e4 100644 --- a/plugins/language_rivet.lua +++ b/plugins/language_rivet.lua @@ -13,7 +13,7 @@ syntax.add { patterns = { {pattern = "//.-\n", type = "comment"}, {pattern = {"/%*", "%*/"}, type = "comment"}, - {pattern = {'[rb]?"', '"', "\\"}, type = "string"}, + {pattern = {'[cbr]?"', '"', "\\"}, type = "string"}, {pattern = {"[b]?'", "'", '\\' }, type = "string"}, {pattern = "0b[01_]+", type = "number"}, {pattern = "0o[0-7_]+", type = "number"}, @@ -24,7 +24,11 @@ syntax.add { {pattern = "-?%.?%d+", type = "number"}, {pattern = "[%+%-=/%*%^%%<>!~|&%.%?]", type = "operator"}, {pattern = "[%a_][%w_]*::", type = "keyword2"}, - {pattern = "[A-Z][%w_]*", type = "keyword2"}, -- types and constants + { -- Uppercase constants of at least 2 chars in len + pattern = "_?%u[%u_][%u%d_]*%f[%s%+%*%-%.%)%]}%?%^%%=/<>~|&;:,!]", + type = "number" + }, + {pattern = "[A-Z][%w_]*", type = "keyword2"}, -- types {pattern = "[%a_][%w_]*%f[(]", type = "function"}, {pattern = "[%a_][%w_]*!%f[(]", type = "keyword2"}, {pattern = "[%a_][%w_]*", type = "symbol"}, @@ -34,7 +38,7 @@ syntax.add { }, symbols = { ["extern"] = "keyword", - ["use"] = "keyword", + ["using"] = "keyword", ["pub"] = "keyword", ["as"] = "keyword", @@ -77,15 +81,14 @@ syntax.add { ["goto"] = "keyword", ["orelse"] = "keyword", ["catch"] = "keyword", - ["cast"] = "keyword", ["or"] = "keyword", ["and"] = "keyword", ["is"] = "keyword", ["in"] = "keyword", -- types - ["c_void"] = "keyword2", ["void"] = "keyword2", + ["no_return"] = "keyword2", ["bool"] = "keyword2", ["i8"] = "keyword2", ["i16"] = "keyword2", @@ -104,7 +107,7 @@ syntax.add { ["Self"] = "keyword2", -- literals - ["base"] = "literal", + ["super"] = "literal", ["self"] = "literal", ["true"] = "literal", ["false"] = "literal", |