aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifest.json7
-rw-r--r--plugins/language_lilypond.lua22
2 files changed, 29 insertions, 0 deletions
diff --git a/manifest.json b/manifest.json
index 77c4bd2..dc7668f 100644
--- a/manifest.json
+++ b/manifest.json
@@ -614,6 +614,13 @@
"url": "https://raw.githubusercontent.com/whiteh0le/lite-plugins/main/plugins/language_ksy.lua?raw=1"
},
{
+ "description": "Syntax for the [LilyPond](https://lilypond.org/) music typesetting language",
+ "version": "0.1",
+ "path": "plugins/language_lilypond.lua",
+ "id": "language_lilypond",
+ "mod_version": "3"
+ },
+ {
"description": "Syntax for [Liquid](https://shopify.github.io/liquid/) templating language",
"version": "0.1",
"path": "plugins/language_liquid.lua",
diff --git a/plugins/language_lilypond.lua b/plugins/language_lilypond.lua
new file mode 100644
index 0000000..a3f84f1
--- /dev/null
+++ b/plugins/language_lilypond.lua
@@ -0,0 +1,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 = {}
+}
+