Add supports for Python builtin types

This commit is contained in:
Ludovic Koenig
2019-09-13 19:53:13 +02:00
parent a242c3e905
commit f3f7995cf6
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -6,7 +6,11 @@
" "
" Python Syntax {{{ " Python Syntax {{{
syntax keyword pythonOdysseyNone None
syntax keyword pythonOdysseyBoolean True False
syntax keyword pythonOdysseyBuiltin int float bool str bytes
syntax keyword pythonOdysseySelf self syntax keyword pythonOdysseySelf self
syntax keyword pythonOdysseyPrint print
syntax match pythonOdysseyFunction '\<\l\w*\>('me=e-1 syntax match pythonOdysseyFunction '\<\l\w*\>('me=e-1
syntax match pythonOdysseyType '\<\u\w*\>' syntax match pythonOdysseyType '\<\u\w*\>'
syntax keyword pythonStatement class nextgroup=pythonOdysseyClass skipwhite syntax keyword pythonStatement class nextgroup=pythonOdysseyClass skipwhite
+6
View File
@@ -298,12 +298,18 @@ endif
call s:h( 'pythonDecorator', 'background', 'warning', 'italic') call s:h( 'pythonDecorator', 'background', 'warning', 'italic')
call s:h( 'pythonDecoratorName', 'background', 'warning', 'italic') call s:h( 'pythonDecoratorName', 'background', 'warning', 'italic')
call s:l( 'pythonOdysseyNone', 'Constant')
call s:l( 'pythonOdysseyBoolean', 'Constant')
call s:l( 'pythonOdysseyBuiltin', 'Type')
call s:l( 'pythonOdysseyPrint', 'Function')
call s:l( 'pythonInclude', 'Statement') call s:l( 'pythonInclude', 'Statement')
call s:l('pythonOdysseyFunction', 'Function') call s:l('pythonOdysseyFunction', 'Function')
call s:l( 'pythonOdysseySelf', 'Special') call s:l( 'pythonOdysseySelf', 'Special')
call s:l( 'pythonOdysseyType', 'Type') call s:l( 'pythonOdysseyType', 'Type')
call s:l( 'pythonOdysseyClass', 'Type') call s:l( 'pythonOdysseyClass', 'Type')
let g:python_no_builtin_highlight = 1
" }}} " }}}
" Ruby Highlights {{{ " Ruby Highlights {{{