diff options
author | Guldoman <giulio.lettieri@gmail.com> | 2022-01-17 19:39:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-17 19:39:10 +0100 |
commit | 751d898c82d14367321ba73e78cd21c824a51e30 (patch) | |
tree | ea100e4b88907f68e462f96b64e6c74b2f3bf926 /plugins/language_gmi.lua | |
parent | f5c5fd4b86d85a4a777a10bef083df75ebff42db (diff) | |
parent | a3249fe89f654d4333ff9ab35d0e9ea3fcb23c49 (diff) | |
download | lite-xl-plugins-751d898c82d14367321ba73e78cd21c824a51e30.tar.gz lite-xl-plugins-751d898c82d14367321ba73e78cd21c824a51e30.zip |
Merge pull request #20 from Not-a-web-Developer/master
adding gemtext highlighting plugin
Diffstat (limited to 'plugins/language_gmi.lua')
-rw-r--r-- | plugins/language_gmi.lua | 21 |
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..a6ef4d8 --- /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 { + name = "Gemtext", + files = { "%.gmi$" }, + patterns = { + { pattern = { "```", "```" }, type = "string" }, + { pattern = "#.*", type = "keyword" }, + { pattern = "%*%s", type = "keyword2" }, + { pattern = "=>", type = "function" }, + { pattern = "https?://%S+", type = "literal" }, + { pattern = "gemini?://%S+", type = "literal" }, + { pattern = ">.*", type = "comment" }, + { pattern = ".*[>*#]", type = "normal" }, + { pattern = ".*=>", type = "normal" } + }, + symbols = { }, +} |