aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_gmi.lua
blob: d1a1fc53e2dee1960bec522d37c6363edaf7db56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- mod-version:3 --lite-xl 2.1
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 = { },
}