robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
ab20681c52
master
1" Vim syntax file 2" Language: Chatito 3" Maintainer: ObserverOfTime <chronobserver@disroot.org> 4" Filenames: *.chatito 5" Last Change: 2022 Sep 19 6 7if exists ( 'b:current_syntax' ) 8finish 9endif 10 11" Comment 12syn keyword chatitoTodo contained TODO FIXME XXX 13syn match chatitoComment /^#. * /contains = chatitoTodo , @Spell 14syn match chatitoComment +^//. * +contains = chatitoTodo , @Spell 15 16" Import 17syn match chatitoImport /^import \+. * $ /transparent contains = chatitoImportKeyword , chatitoImportFile 18syn keyword chatitoImportKeyword import contained nextgroup = chatitoImportFile 19syn match chatitoImportFile /. * $ /contained skipwhite 20 21" Intent 22syn match chatitoIntent /^%\[ [ ^\]? ] \+\]\((.\+)\)\=$ /contains = chatitoArgs 23 24" Slot 25syn match chatitoSlot /^@\[ [ ^\]?# ] \+\(# [ ^\]?# ] \+\)\=\]\((.\+)\)\=$ /contains = chatitoArgs , chatitoVariation 26syn match chatitoSlot /@\[ [ ^\]?# ] \+\(# [ ^\]?# ] \+\)\=?\=\] /contained contains = chatitoOpt , chatitoVariation 27 28" Alias 29syn match chatitoAlias /^\~\[ [ ^\]? ] \+\]\=$ / 30syn match chatitoAlias /\~\[ [ ^\]? ] \+?\=\] /contained contains = chatitoOpt 31 32" Probability 33syn match chatitoProbability /\*\[\d\+\(\.\d\+\)\=%\=\] /contained 34 35" Optional 36syn match chatitoOpt '? 'contained 37 38" Arguments 39syn match chatitoArgs /(.\+) /contained 40 41" Variation 42syn match chatitoVariation /# [ ^\]?# ] \+ /contained 43 44" Value 45syn match chatitoValue /^ \{4\}\zs.\+$ /contains = chatitoProbability , chatitoSlot , chatitoAlias , @Spell 46 47" Errors 48syn match chatitoError /^\t / 49 50hi def link chatitoAlias String 51hi def link chatitoArgs Special 52hi def link chatitoComment Comment 53hi def link chatitoError Error 54hi def link chatitoImportKeyword Include 55hi def link chatitoIntent Statement 56hi def link chatitoOpt SpecialChar 57hi def link chatitoProbability Number 58hi def link chatitoSlot Identifier 59hi def link chatitoTodo Todo 60hi def link chatitoVariation Special 61 62let b: current_syntax = 'chatito'