diff options
author | rxi <rxi@users.noreply.github.com> | 2019-12-28 11:36:13 +0000 |
---|---|---|
committer | rxi <rxi@users.noreply.github.com> | 2019-12-28 11:36:13 +0000 |
commit | 8156f538cdf577a0163759a6c8484891a2e29c25 (patch) | |
tree | c7c2825cb669fb8e1d32a382c125f2d9fd60e12f /language_fe.lua | |
download | lite-xl-plugins-8156f538cdf577a0163759a6c8484891a2e29c25.tar.gz lite-xl-plugins-8156f538cdf577a0163759a6c8484891a2e29c25.zip |
Initial commit
Diffstat (limited to 'language_fe.lua')
-rw-r--r-- | language_fe.lua | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/language_fe.lua b/language_fe.lua new file mode 100644 index 0000000..f97e73b --- /dev/null +++ b/language_fe.lua @@ -0,0 +1,33 @@ +local syntax = require "core.syntax" + +syntax.add { + files = "%.fe$", + comment = ";", + patterns = { + { pattern = ";.-\n", type = "comment" }, + { pattern = { '"', '"', '\\' }, type = "string" }, + { pattern = "0x[%da-fA-F]+", type = "number" }, + { pattern = "-?%d+[%d%.]*", type = "number" }, + { pattern = "-?%.?%d+", type = "number" }, + { pattern = "'", type = "symbol" }, + { pattern = "%f[^(][^()'%s\"]+", type = "function" }, + { pattern = "[^()'%s\"]+", type = "symbol" }, + }, + symbols = { + ["if"] = "keyword2", + ["let"] = "keyword2", + ["do"] = "keyword2", + ["fn"] = "keyword2", + ["mac"] = "keyword2", + ["'"] = "keyword2", + ["print"] = "keyword", + ["while"] = "keyword", + ["car"] = "keyword", + ["cdr"] = "keyword", + ["not"] = "keyword", + ["setcdr"] = "keyword", + ["setcar"] = "keyword", + ["nil"] = "literal", + ["t"] = "literal", + } +} |