aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorJobinsJC <jobinsjjc1492@protonmail.com>2021-11-28 10:41:42 +0900
committerJobinsJC <jobinsjjc1492@protonmail.com>2021-11-28 10:41:42 +0900
commit4f5d7e9ddfde8feb0d8d9efb91f6cbb47e99137b (patch)
treeacebe4a37c48e54eb62f31d5c09ea54139f8bbbc /plugins
parent8d3c856a3feb647f87b4a098e27f383bbedcda1d (diff)
downloadlite-xl-plugins-4f5d7e9ddfde8feb0d8d9efb91f6cbb47e99137b.tar.gz
lite-xl-plugins-4f5d7e9ddfde8feb0d8d9efb91f6cbb47e99137b.zip
More improvements
Diffstat (limited to 'plugins')
-rw-r--r--plugins/language_julia.lua22
1 files changed, 13 insertions, 9 deletions
diff --git a/plugins/language_julia.lua b/plugins/language_julia.lua
index b0f953f..6dea1a8 100644
--- a/plugins/language_julia.lua
+++ b/plugins/language_julia.lua
@@ -11,20 +11,21 @@ syntax.add {
patterns = {
{ pattern = { "#=", "=#" }, type = "comment" },
{ pattern = "#.-\n", type = "comment" },
- { pattern = { '[ruU]?"""', '"""'; '\\' }, type = "string" },
- { pattern = { '"', '"', '\\' }, type = "string" },
- { pattern = { "`", "`", '\\' }, type = "string" },
+ { pattern = '[%a_][%w_]*"""*[%a_][%w_]*"""', type = "function" },
+ { pattern = { '[ruU]?"', '"', '\\' }, type = "string" },
+ { pattern = { "[ruU]?'", "'", '\\' }, type = "string" },
{ pattern = "0[oO_][0-7]+", type = "number" },
{ pattern = "-?0x[%x_]+", type = "number" },
+ { pattern = "-?0b[%x_]+", type = "number" },
{ pattern = "-?%d+_%d", type = "number" },
{ pattern = "-?%d+[%d%.eE]*f?", type = "number" },
{ pattern = "-?%.?%d+f?", type = "number" },
- { pattern = "[%+%-=/%*%^%%<>!~|&%:]", type = "operator"},
- { pattern = "[%a_][%w_]*%f[(]", type = "function" },
- { pattern = "@[%a_][%w_]*[%a_][%w_]", type = "function" },
- { pattern = "[%a_][%w_]*%.*!", type = "keyword2" },
- { pattern = "{[%a_][%w_]*}", type = "string"},
- { pattern = "[%a_][%w_]*", type = "symbol" },
+ { pattern = "[%+%-=/%*%^%%<>!~|&%:]", type = "operator" },
+ { pattern = "[%a_][%w_]*%f[(]", type = "function" },
+ { pattern = "@[%a_][%w_]*[%a_][%w_]", type = "function" },
+ { pattern = "[%a_][%w_]*%.*!", type = "keyword2" },
+ { pattern = "{[%a_][%w_]*}", type = "string" },
+ { pattern = "[%a_][%w_]*", type = "symbol" },
},
symbols = {
-- keywords
@@ -88,11 +89,14 @@ syntax.add {
["Ref"] = "keyword2",
["String"] = "keyword2",
["Function"] = "keyword2",
+ ["Number"] = "keyword2",
-- literals
["missing"] = "literal",
["true"] = "literal",
["false"] = "literal",
["nothing"] = "literal",
+ ["Inf"] = "literal",
+ ["NaN"] = "literal",
}
}