codekingpro/portable-devtools
114k
1vim9script2 3# Vim syntax file.4# Language: Haredoc (Hare documentation format)5# Maintainer: Amelia Clarke <selene@perilune.dev>6# Last Change: 2026 Jan 247# Upstream: https://git.sr.ht/~sircmpwn/hare.vim8 9if exists('b:current_syntax')10 finish11endif12 13# Syntax {{{114syn case match15syn iskeyword @,48-57,_16 17# Embedded code samples.18syn region haredocCode excludenl start='\v%(^\s*\t)@<=' end='$' contains=@NoSpell display19 20# References to other declarations and modules.21syn match haredocSpecial '\v\[\[\h\w*%(::\h\w*)*%(::)?]]' contains=@NoSpell display22 23# Miscellaneous.24syn keyword haredocTodo FIXME TODO XXX25 26# Default highlighting {{{127hi def link haredocCode Comment28hi def link haredocSpecial Special29hi def link haredocTodo Todo30 31# Highlight incorrect whitespace by default.32syn match haredocSpaceError excludenl '\s\+$' containedin=ALL display33syn match haredocSpaceError '.\zs \+\ze\t' containedin=ALL display34if get(g:, 'hare_space_error', 1)35 hi! def link haredocSpaceError Error36else37 hi! def link haredocSpaceError NONE38endif39 40b:current_syntax = 'haredoc'41 42# vim: fdm=marker et sts=2 sw=2 ts=8 tw=8043 