Add some supports for Python

It relinks some default syntax groups and defines some new ones. It
especially deals with functions, classes and decorators.
This commit is contained in:
Ludovic Koenig
2019-09-11 22:05:46 +02:00
parent 9a392a6a9e
commit a242c3e905
2 changed files with 28 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
"
" Maintainer: Ludovic Koenig <ludovic.koenig@gmail.com>
" Version: 0.5.0
" Since: 0.5.0
" License: MIT
"
" Python Syntax {{{
syntax keyword pythonOdysseySelf self
syntax match pythonOdysseyFunction '\<\l\w*\>('me=e-1
syntax match pythonOdysseyType '\<\u\w*\>'
syntax keyword pythonStatement class nextgroup=pythonOdysseyClass skipwhite
syntax match pythonOdysseyClass "\<\u\w*\>"
" }}}
" vim: foldmethod=marker
+11
View File
@@ -293,6 +293,17 @@ else
let g:java_ignore_javadoc = 1
endif
" }}}
" Python Highlights {{{
call s:h( 'pythonDecorator', 'background', 'warning', 'italic')
call s:h( 'pythonDecoratorName', 'background', 'warning', 'italic')
call s:l( 'pythonInclude', 'Statement')
call s:l('pythonOdysseyFunction', 'Function')
call s:l( 'pythonOdysseySelf', 'Special')
call s:l( 'pythonOdysseyType', 'Type')
call s:l( 'pythonOdysseyClass', 'Type')
" }}}
" Ruby Highlights {{{