kivy.vim (991B)
1 " Vim syntax file 2 " Language: Kivy 3 " Maintainer: Corey Prophitt <corey@prophitt.me> 4 " Last Change: Jul 31st, 2024 5 " Version: 1 6 " URL: https://kivy.org/ 7 8 if exists("b:current_syntax") 9 finish 10 endif 11 12 " Load Python syntax first (Python can be used within Kivy) 13 syn include @pyth $VIMRUNTIME/syntax/python.vim 14 15 " Kivy language rules can be found here 16 " https://kivy.org/doc/stable/guide/lang.html 17 18 " Define Kivy syntax 19 syn match kivyPreProc /#:.*/ 20 syn match kivyComment /#[^:].*/ 21 syn match kivyRule /<\I\i*\(,\s*\I\i*\)*>:/ 22 syn match kivyAttribute /\<\I\i*\>/ nextgroup=kivyValue 23 24 syn region kivyValue start=":" end=/$/ contains=@pyth skipwhite 25 26 syn region kivyAttribute matchgroup=kivyIdent start=/[\a_][\a\d_]*:/ end=/$/ contains=@pyth skipwhite 27 28 hi def link kivyPreproc PreProc 29 hi def link kivyComment Comment 30 hi def link kivyRule Function 31 hi def link kivyIdent Statement 32 hi def link kivyAttribute Label 33 34 let b:current_syntax = "kivy" 35 36 " vim: ts=8