robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
ab20681c52
master
1" Vim syntax file 2" Language: LyRiCs 3" Maintainer: ObserverOfTime <chronobserver@disroot.org> 4" Filenames: *.lrc 5" Last Change: 2025 Jan 13 6 7if exists ( 'b:current_syntax' ) 8finish 9endif 10 11let s: cpo_save = & cpoptions 12set cpoptions & vim 13 14syn case ignore 15 16" Errors 17syn match lrcError /^.\+$ / 18 19" ID tags 20syn match lrcTag /^\s * \[\a\+:.\+\]\s * $ /contains = lrcTagName , lrcTagValue 21syn match lrcTagName contained nextgroup = lrcTagValue 22 \ /\[\zs\(al\|ar\|au\|by\|encoding\|la\|id\|length\|offset\|re\|ti\|ve\)\ze: / 23syn match lrcTagValue /:\zs.\+\ze\] /contained 24 25" Lyrics 26syn match lrcLyricTime /^\s * \(\[\d\d:\d\d\.\d\d\d\?\]\)\+ / 27 \contains = lrcNumber nextgroup = lrcLyricLine 28syn match lrcLyricLine /. * $ /contained contains = lrcWordTime , @Spell 29syn match lrcWordTime /<\d\d:\d\d\.\d\d> /contained contains = lrcNumber , @NoSpell 30syn match lrcNumber /[ +- ] \=\d\+ /contained 31 32hi def link lrcLyricTime Label 33hi def link lrcNumber Number 34hi def link lrcTag PreProc 35hi def link lrcTagName Identifier 36hi def link lrcTagValue String 37hi def link lrcWordTime Special 38hi def link lrcError Error 39 40let b: current_syntax = 'lyrics' 41 42let & cpoptions = s: cpo_save 43unlet s: cpo_save