aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_bib.lua
blob: 844ce76d339bca703a9c2c5c77c7354133389cf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- mod-version:3 --lite-xl 2.1
local syntax = require "core.syntax"

syntax.add {
  name = "BibTeX",
  files = { "%.bib$" },
  comment = "%%",
  patterns = {
    { pattern = {"%%", "\n"},     type = "comment"   },
    { pattern = "@%a+",           type = "keyword"   },
    { pattern = "%a+%s=",         type = "keyword2"  },
  },
  symbols = {
    ["author"] = "keyword",
    ["doi"] = "keyword",
    ["issue"] = "keyword",
    ["journal"] = "keyword",
    ["month"] = "keyword",
    ["numpages"] = "keyword",
    ["pages"] = "keyword",
    ["publisher"] = "keyword",
  }
}