aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_gmi.lua
blob: 0804267af21d593268647b64e3132db2a66d11ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- 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 = "%*.*",                     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 = { },
}