aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/language_julia.lua29
1 files changed, 17 insertions, 12 deletions
diff --git a/plugins/language_julia.lua b/plugins/language_julia.lua
index 6dea1a8..ecdbdc0 100644
--- a/plugins/language_julia.lua
+++ b/plugins/language_julia.lua
@@ -9,22 +9,25 @@ syntax.add {
files = { "%.jl$" },
comment = "#",
patterns = {
- { pattern = { "#=", "=#" }, type = "comment" },
- { pattern = "#.-\n", type = "comment" },
- { pattern = '[%a_][%w_]*"""*[%a_][%w_]*"""', type = "function" },
- { pattern = { '[ruU]?"', '"', '\\' }, type = "string" },
- { pattern = { "[ruU]?'", "'", '\\' }, type = "string" },
+ {pattern = {"#=", "=#"}, type="comment" },
+ {pattern = "#.*$", type="comment" },
+ { pattern = "%d%w*[%.-+*//]", type = "number" },
{ 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 = "[^%d%g]%:%a*", type = "function" },
+ { pattern = "[%+%-=/%*%^%%<>!~|&%:]",type = "operator"},
+ { pattern = '""".*"""', type = "string" },
+ { pattern = '".*"', type = "string" },
+ { pattern = '[bv]".*"', type = "string" },
+ { pattern = 'r".*$', type = "string" },
+ { pattern = "'\\.*'", type = "string" },
+ { pattern = "'.'", type = "string" },
{ pattern = "[%a_][%w_]*%f[(]", type = "function" },
- { pattern = "@[%a_][%w_]*[%a_][%w_]", type = "function" },
- { pattern = "[%a_][%w_]*%.*!", type = "keyword2" },
- { pattern = "{[%a_][%w_]*}", type = "string" },
+ { pattern = ".*!", type="function"},
{ pattern = "[%a_][%w_]*", type = "symbol" },
},
symbols = {
@@ -53,6 +56,7 @@ syntax.add {
["let"] = "keyword",
["local"] = "keyword",
["macro"] = "keyword",
+ ["type"] = "keyword",
["module"] = "keyword",
["mutable"] = "keyword",
["quote"] = "keyword",
@@ -65,12 +69,13 @@ syntax.add {
-- types
["struct"] = "keyword2",
- ["abstract type"] = "keyword2",
- ["primitive type"] = "keyword2",
- ["mutable struct"] = "keyword2",
+ ["abstract"] = "keyword2",
+ ["primitive"] = "keyword2",
+ ["mutable"] = "keyword2",
["Char"] = "keyword2",
["Bool"] = "keyword2",
["Int"] = "keyword2",
+ ["Integer"] = "keyword2",
["Int8"] = "keyword2",
["UInt8"] = "keyword2",
["Int16"] = "keyword2",