Added lilypond edition

This commit is contained in:
marc
2025-04-04 15:27:23 +02:00
parent 6962d70468
commit 379a6653ce
30 changed files with 2078 additions and 42 deletions

View File

@@ -0,0 +1,35 @@
/* Override background and text color for the entire editor */
.CodeMirror {
background: #1e1e1e; /* Dark background */
color: #f8f8f2; /* Light text */
}
/* Optional: Style the gutter (line numbers) */
.CodeMirror-gutters {
background: #1e1e1e;
border-right: 1px solid #444;
}
/* Optional: Style active line */
.CodeMirror-activeline-background {
background: #2a2a2a !important;
}
/* Make the cursor white */
.CodeMirror-cursor {
border-left: 1px solid white !important;
}
/* Optional: Change the cursor color when focused/unfocused */
.CodeMirror-focused .CodeMirror-cursor {
border-left: 1px solid white !important;
}
.cm-keyword {
/* Commands like \relative */
color: #569cd6;
}
.cm-comment {
/* Notes like c4, d'8 */
color: #5c5c5c;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,17 @@
CodeMirror.defineMode("lilypond", function() {
return {
token: function(stream) {
// Highlight Comments
if (stream.match(/%.*$/)) {
return "comment";
}
// Highlight LilyPond commands (e.g., \relative, \time, \key)
if (stream.match(/\\[a-zA-Z]+/)) {
return "keyword";
}
// Move to the next character
stream.next();
return null;
}
};
});