diff options
author | JobinsJC <jobinsjjc1492@protonmail.com> | 2021-11-23 12:30:29 +0900 |
---|---|---|
committer | JobinsJC <jobinsjjc1492@protonmail.com> | 2021-11-23 12:30:29 +0900 |
commit | 7a9b79511736325d9f42084deba2862c016a6277 (patch) | |
tree | c93adfbd9f0ace80381e53066f872f4fd4d16b64 | |
parent | cf1b982d19b0620af0601cef6fc743d248cd12ca (diff) | |
download | lite-xl-plugins-7a9b79511736325d9f42084deba2862c016a6277.tar.gz lite-xl-plugins-7a9b79511736325d9f42084deba2862c016a6277.zip |
Add Julia support
-rw-r--r-- | plugins/language_julia.lua | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/plugins/language_julia.lua b/plugins/language_julia.lua new file mode 100644 index 0000000..c4e4e37 --- /dev/null +++ b/plugins/language_julia.lua @@ -0,0 +1,85 @@ +-- mod-version:2 -- lite-xl 2.0 +-- Support for the GDScript programming language: https://godotengine.org/ +-- Covers the most used keywords up to Godot version 3.2.x + +local syntax = require "core.syntax" + +syntax.add { + files = { "%.jl$" }, + comment = "#", + patterns = { + { pattern = { "#=", "=#" }, type = "comment" }, + { pattern = "#.-\n", type = "comment" }, + { pattern = { '"', '"', '\\' }, type = "string" }, + { pattern = { "`", "`", '\\' }, type = "string" }, + { pattern = "0[oO_][0-7]+", type = "number" }, + { pattern = "-?0x[%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_]*", type = "symbol" }, + }, + symbols = { + -- keywords + ["abstract type"] = "keyword", + ["baremodule"] = "keyword", + ["begin"] = "keyword", + ["break`"] = "keyword", + ["catch"] = "keyword", + ["const"] = "keyword", + ["continue"] = "keyword", + ["do"] = "keyword", + ["Dict"] = "keyword", + ["Set"] = "keyword", + ["Union"] = "keyword", + ["else"] = "keyword", + ["elseif"] = "keyword", + ["end"] = "keyword", + ["export"] = "keyword", + ["finally"] = "keyword", + ["for"] = "keyword", + ["function"] = "keyword", + ["global"] = "keyword", + ["if"] = "keyword", + ["import"] = "keyword", + ["let"] = "keyword", + ["local"] = "keyword", + ["macro"] = "keyword", + ["module"] = "keyword", + ["quote"] = "keyword", + ["return"] = "keyword", + ["try"] = "keyword", + ["typeof"] = "keyword", + ["using"] = "keyword", + ["while"] = "keyword", + + -- types + ["struct"] = "keyword2", + ["mutable struct"] = "keyword2", + ["Char"] = "keyword2", + ["Bool"] = "keyword2", + ["Int"] = "keyword2", + ["Int8"] = "keyword2", + ["UInt8"] = "keyword2", + ["Int16"] = "keyword2", + ["UInt16"] = "keyword2", + ["Int32"] = "keyword2", + ["UInt32"] = "keyword2", + ["Int64"] = "keyword2", + ["UInt64"] = "keyword2", + ["Int128"] = "keyword2", + ["UInt128"] = "keyword2", + ["Float16"] = "keyword2", + ["Float32"] = "keyword2", + ["Float64"] = "keyword2", + ["Vector"] = "keyword2", + ["Matrix"] = "keyword2", + + -- literals + ["missing"] = "literal", + ["true"] = "literal", + ["false"] = "literal", + }, +} |