aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/language_odin.lua56
1 files changed, 18 insertions, 38 deletions
diff --git a/plugins/language_odin.lua b/plugins/language_odin.lua
index fb60a6c..c3413f2 100644
--- a/plugins/language_odin.lua
+++ b/plugins/language_odin.lua
@@ -4,23 +4,23 @@ syntax.add {
files = "%.odin$",
comment = "//",
patterns = {
- { pattern = "//.-\n", type = "comment" },
- { pattern = { "/%*", "%*/" }, type = "comment" },
- { pattern = { '"', '"', '\\' }, type = "string" },
- { pattern = { "'", "'", '\\' }, type = "string" },
- { pattern = { "`", "`" }, type = "string" },
- { pattern = "0b[01_]+", type = "number" },
- { pattern = "0o[0-7_]+", type = "number" },
- { pattern = "0[dz][%d_]+", type = "number" },
- { pattern = "0x[%da-fA-F_]+", type = "number" },
- { pattern = "-?%d+[%d%._e]*i?", type = "number" },
- { pattern = "-?%.?[%d_]+i?", type = "number" },
- { pattern = "[<>~=+-*/]=", type = "operator" },
- { pattern = "[::][:=]", type = "operator" },
- { pattern = "[%+%-=/%*%^%%<>!~|&:]", type = "operator" },
- { pattern = "%$[%a_][%w_]*", type = "operator" },
- { pattern = "[%a_][%w_]*%f[(]", type = "function" },
- { pattern = "[#@]?[%a_][%w_]*", type = "symbol" },
+ { pattern = "//.-\n", type = "comment" },
+ { pattern = { "/%*", "%*/" }, type = "comment" },
+ { pattern = { '"', '"', '\\' }, type = "string" },
+ { pattern = { "'", "'", '\\' }, type = "string" },
+ { pattern = { "`", "`" }, type = "string" },
+ { pattern = "0b[01_]+", type = "number" },
+ { pattern = "0o[0-7_]+", type = "number" },
+ { pattern = "0[dz][%d_]+", type = "number" },
+ { pattern = "0x[%da-fA-F_]+", type = "number" },
+ { pattern = "-?%d+[%d%._e]*i?", type = "number" },
+ { pattern = "[<>~=+-*/]=", type = "operator" },
+ { pattern = "[%+%-=/%*%^%%<>!~|&:]", type = "operator" },
+ { pattern = "%$[%a_][%w_]*", type = "operator" },
+ { pattern = "[%a_][%w_]*%f[(]", type = "function" },
+ { pattern = "[#@][%a_][%w_]*", type = "keyword2" },
+ { pattern = "[#@]%b()", type = "keyword2" },
+ { pattern = "[%a_][%w_]*", type = "symbol" },
},
symbols = {
-- Keywords
@@ -36,7 +36,7 @@ syntax.add {
["switch"] = "keyword",
["case"] = "keyword",
["in"] = "keyword",
- ["notin"] = "keyword",
+ ["not_in"] = "keyword",
["do"] = "keyword",
["break"] = "keyword",
["continue"] = "keyword",
@@ -79,26 +79,6 @@ syntax.add {
["abs"] = "keyword2",
["clamp"] = "keyword2",
["assert"] = "keyword2",
- ["#assert"] = "keyword2",
- ["#location"] = "keyword2",
- ["#caller_location"] = "keyword2",
- ["#packed"] = "keyword2",
- ["#raw_union"] = "keyword2",
- ["#align"] = "keyword2",
- ["#no_nil"] = "keyword2",
- ["#complete"] = "keyword2",
- ["#no_alias"] = "keyword2",
- ["#align"] = "keyword2",
- ["#load"] = "keyword2",
- ["#location"] = "keyword2",
- ["#file"] = "keyword2",
- ["#line"] = "keyword2",
- ["#procedure"] = "keyword2",
- ["#defined"] = "keyword2",
- ["#no_bounds_check"] = "keyword2",
- ["#bounds_check"] = "keyword2",
- ["#type"] = "keyword2",
- ["@private"] = "keyword2",
-- Types
["rawptr"] = "keyword2",
["typeid"] = "keyword2",