aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorrxi <rxi@users.noreply.github.com>2020-08-30 09:57:07 +0100
committerrxi <rxi@users.noreply.github.com>2020-08-30 09:57:07 +0100
commit0d8c4544abc0a7ebff018ceacdbcd4ab9ff9cce2 (patch)
tree3cbd3ebe9568389ed02087b377fdbfe4828d8987 /plugins
parentef3aeeb4e29bb7c1fdab094b03e03b34c93d6468 (diff)
downloadlite-xl-plugins-0d8c4544abc0a7ebff018ceacdbcd4ab9ff9cce2.tar.gz
lite-xl-plugins-0d8c4544abc0a7ebff018ceacdbcd4ab9ff9cce2.zip
language_odin improvements
Diffstat (limited to 'plugins')
-rw-r--r--plugins/language_odin.lua36
1 files changed, 17 insertions, 19 deletions
diff --git a/plugins/language_odin.lua b/plugins/language_odin.lua
index 6f393c8..fb60a6c 100644
--- a/plugins/language_odin.lua
+++ b/plugins/language_odin.lua
@@ -4,25 +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[0-1]+", type = "number" },
- { pattern = "0o[0-7]+", type = "number" },
- { pattern = "0d[%d]+", type = "number" },
- { pattern = "0z[%d]+", type = "number" },
- { pattern = "0x[%da-fA-F]+", type = "number" },
- { pattern = "-?%d+[%d%.]*", type = "number" },
- { pattern = "-?%.?%d+?", type = "number" },
- { pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" },
- { pattern = "[<>~=+-*/]=", type = "operator" },
- { pattern = "[::][:=]", type = "operator" },
- { pattern = "[:]", type = "operator" },
- { pattern = "$[TE]", 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 = "-?%.?[%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" },
},
symbols = {
-- Keywords