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

syntax.add {
  name = "LilyPond",
  files = { "%.i?ly$" },
  comment = "%%",
  block_comment = { "%%{", "%%}" },
  patterns = {
    { pattern = "#%(()[%a_]%S*",          type = { "operator", "function" } },
    { pattern = {"%%{", "%%}"},           type = "comment"  },
    { pattern = "%%.*",                   type = "comment"  },
    { pattern = "#[%w_-]*",               type = "keyword2" },
    { pattern = "\\%a%w+",                type = "keyword"  },
    { pattern = "\\\\",                   type = "operator" },
    { pattern = "[%(%){}%[%]<>=/~%-%_']", type = "operator" },
    { pattern = {'"', '"', "\\"},         type = "string"   },
    { pattern = "-?%.?%d+",               type = "number"   },
  },
  symbols = {}
}