" LilyPond syntax file
" Language: LilyPond
" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
-" Created: Oct 17, 2002
-" Last Change: Sep 23, 2003
-" Version: 6.1-1
+" Last Change: 2010 Jul 26
"
" Installed As: vim/syntax/lilypond.vim
" Uses Generated File: vim/syntax/lilypond-words.vim
" Case matters
syn case match
-syn cluster lilyMatchGroup contains=lilyMatcher,lilyString,lilyComment,lilyStatement,lilyNumber,lilyEquation,lilySlur,lilySpecial,lilyNote,lilyKeyword,lilyArticulation,lilyReservedWord
+syn cluster lilyMatchGroup contains=lilyMatcher,lilyString,lilyComment,lilyStatement,lilyNumber,lilySlur,lilySpecial,lilyNote,lilyKeyword,lilyArticulation,lilyReservedWord,lilyScheme
syn region lilyMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[<>]" end="}" contains=@lilyMatchGroup fold
syn region lilyMatcher matchgroup=Delimiter start="\[" end="]" contains=@lilyMatchGroup fold
syn region lilyComment start="%\([^{]\|$\)" end="$"
syn match lilyNumber "[-_^.]\?\d\+[.]\?"
-syn match lilyEquation "\(#['`]\)\?\(\a*[-]\)*\a*\s*=\s*\(#[#'`]\?\)\?\a*"
syn match lilySlur "[(~)]"
syn match lilySlur "\\[()]"
syn match lilySpecial "\\[<!>\\]"
" c--\mf c^^\mf c__\mf
syn match lilyArticulation "[-_^][-_^+|>.]"
+" Include Scheme syntax highlighting, where appropriate
+syn include @embeddedScheme syntax/scheme.vim
+unlet b:current_syntax
+syn region lilyScheme matchgroup=Delimiter start="#['`]\?(" matchgroup=Delimiter end=")" contains=@embeddedScheme
+
" Rest of syntax highlighting rules start here
"
" " Define the default highlighting.
delcommand HiLink
endif
+
+let b:current_syntax = "lilypond"