aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAsh-Coder-or-Not <newestideaz@gmail.com>2022-01-17 01:54:11 +0530
committerAsh-Coder-or-Not <newestideaz@gmail.com>2022-01-17 01:54:11 +0530
commite5ce2c06c3af2470aaed18981129503f1ad4d94c (patch)
tree959a1b6b18d9cb91c1f12dde98259228d23299b3 /plugins
parent2d8a20917b97b64425adedb37f2c0d438b42ab24 (diff)
downloadlite-xl-plugins-e5ce2c06c3af2470aaed18981129503f1ad4d94c.tar.gz
lite-xl-plugins-e5ce2c06c3af2470aaed18981129503f1ad4d94c.zip
adding gemtext highlighting plugin
Diffstat (limited to 'plugins')
-rw-r--r--plugins/language_gmi.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/language_gmi.lua b/plugins/language_gmi.lua
new file mode 100644
index 0000000..f478126
--- /dev/null
+++ b/plugins/language_gmi.lua
@@ -0,0 +1,21 @@
+-- mod-version:2 -- lite-xl 2.0
+local syntax = require "core.syntax"
+
+
+
+syntax.add {
+ files = { "%.gmi$" },
+ patterns = {
+ { pattern = { "```", "```" }, type = "string" },
+ { pattern = "#.-\n", type = "keyword" },
+ { pattern = "%*.*\n", type = "keyword2" },
+ { pattern = "=>", type = "function" },
+ { pattern = "!?%[.-%]%(.-%)", type = "function" },
+ { pattern = "https?://%S+", type = "literal" },
+ { pattern = "gemini?://%S+", type = "literal" },
+ { pattern = ">.*", type = "comment" },
+ { pattern = ".*[>*#]", type = "normal" },
+ { pattern = ".*=>", type = "normal" }
+ },
+ symbols = { },
+}