aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_po.lua
blob: a1b098c52e5586282f60523f3985888bec7d5045 (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 = "PO",
  files = { "%.po$", "%.pot$" },
  comment = "#",
  patterns = {
    { pattern = { "#", "\n"},        type = "comment"  },
    { pattern = { '"', '"', '\\' },  type = "string"   },
    { pattern = "[%[%]]",            type = "operator" },
    { pattern = "%d+",               type = "number"   },
    { pattern = "[%a_][%w_]*",       type = "symbol"   },
  },
  symbols = {
    ["msgctxt"]      = "keyword",
    ["msgid"]        = "keyword",
    ["msgid_plural"] = "keyword",
    ["msgstr"]       = "keyword",
  },
}