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