aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_tex.lua
blob: eced48998f51b51c941500d750de01a4c5dcea29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local syntax = require "core.syntax"

syntax.add {
  files = { "%.tex$" },
  comment = "%%",
  patterns = {
    { pattern = {"%%", "\n"},     type = "comment"  },
    { pattern = "&",              type = "operator" },
    { pattern = "\\\\",           type = "operator" },
    { pattern = {"%$", "%$"},     type = "operator" },
    { pattern = {"\\%[", "\\]"},  type = "operator" },
    { pattern = {"{", "}"},       type = "keyword"  },
    { pattern = "\\%w*",          type = "keyword2" },
  },
  symbols = {}
}