mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
vim-patch:597aadc: runtime(lyrics): support multiple timestamps in syntax script
Problem: Multiple timestamps in the same line were not highlighted
Solution: Adapt the syntax to support multiple timestamps
fixes: vim/vim#15703
closes: vim/vim#15707
597aadcf21
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
" Language: LyRiCs
|
" Language: LyRiCs
|
||||||
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
|
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
|
||||||
" Filenames: *.lrc
|
" Filenames: *.lrc
|
||||||
" Last Change: 2022 Sep 18
|
" Last Change: 2024 Sep 20
|
||||||
|
|
||||||
if exists('b:current_syntax')
|
if exists('b:current_syntax')
|
||||||
finish
|
finish
|
||||||
@@ -23,7 +23,7 @@ syn match lrcTagName contained nextgroup=lrcTagValue
|
|||||||
syn match lrcTagValue /:\zs.\+\ze\]/ contained
|
syn match lrcTagValue /:\zs.\+\ze\]/ contained
|
||||||
|
|
||||||
" Lyrics
|
" Lyrics
|
||||||
syn match lrcLyricTime /^\s*\[\d\d:\d\d\.\d\d\]/
|
syn match lrcLyricTime /^\s*\(\[\d\d:\d\d\.\d\d\]\)\+/
|
||||||
\ contains=lrcNumber nextgroup=lrcLyricLine
|
\ contains=lrcNumber nextgroup=lrcLyricLine
|
||||||
syn match lrcLyricLine /.*$/ contained contains=lrcWordTime,@Spell
|
syn match lrcLyricLine /.*$/ contained contains=lrcWordTime,@Spell
|
||||||
syn match lrcWordTime /<\d\d:\d\d\.\d\d>/ contained contains=lrcNumber,@NoSpell
|
syn match lrcWordTime /<\d\d:\d\d\.\d\d>/ contained contains=lrcNumber,@NoSpell
|
||||||
|
|||||||
Reference in New Issue
Block a user