blob: 76e3576e7820c554a2d9bc6d63f3b5cc29cf5358 [file] [log] [blame]
Bram Moolenaar822ff862014-06-12 21:46:14 +02001" Vim syntax file
2" Language: Kivy
3" Maintainer: Corey Prophitt <prophitt.corey@gmail.com>
Riley Bruins8906e222024-07-07 20:53:04 +02004" Last Change: Jul 6th, 2024
Bram Moolenaar822ff862014-06-12 21:46:14 +02005" Version: 1
6" URL: http://kivy.org/
7
8if exists("b:current_syntax")
9 finish
10endif
11
12" Load Python syntax first (Python can be used within Kivy)
13syn include @pyth $VIMRUNTIME/syntax/python.vim
14
15" Kivy language rules can be found here
16" http://kivy.org/docs/guide/lang.html
17
18" Define Kivy syntax
19syn match kivyPreProc /#:.*/
Riley Bruins8906e222024-07-07 20:53:04 +020020syn match kivyComment /#[^:].*/
Bram Moolenaar822ff862014-06-12 21:46:14 +020021syn match kivyRule /<\I\i*\(,\s*\I\i*\)*>:/
22syn match kivyAttribute /\<\I\i*\>/ nextgroup=kivyValue
23
24syn region kivyValue start=":" end=/$/ contains=@pyth skipwhite
25
26syn region kivyAttribute matchgroup=kivyIdent start=/[\a_][\a\d_]*:/ end=/$/ contains=@pyth skipwhite
27
28hi def link kivyPreproc PreProc
29hi def link kivyComment Comment
30hi def link kivyRule Function
31hi def link kivyIdent Statement
32hi def link kivyAttribute Label
33
34let b:current_syntax = "kivy"
35
36" vim: ts=8