aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_fe.lua
diff options
context:
space:
mode:
authorrxi <rxi@users.noreply.github.com>2020-04-23 20:49:37 +0100
committerrxi <rxi@users.noreply.github.com>2020-04-23 20:49:37 +0100
commit676f04945010aeb2ae71325bf2d1d6f336a5e162 (patch)
tree31b2e18df5e84fbc731840e5f1b28c974eea868a /plugins/language_fe.lua
parent9049e189d49440939192874d54af15a21eebbafb (diff)
downloadlite-xl-plugins-676f04945010aeb2ae71325bf2d1d6f336a5e162.tar.gz
lite-xl-plugins-676f04945010aeb2ae71325bf2d1d6f336a5e162.zip
Moved all plugins to `plugins` dir
Diffstat (limited to 'plugins/language_fe.lua')
-rw-r--r--plugins/language_fe.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/language_fe.lua b/plugins/language_fe.lua
new file mode 100644
index 0000000..f97e73b
--- /dev/null
+++ b/plugins/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",
+ }
+}