aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_gmi.lua
blob: c5d819a81bda414dd72e6efd15fcc0b0309c7d6b (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
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 = { },
}