@@ -44,6 +44,7 @@ if s:Enabled('g:python_highlight_all')
44
44
if s: Enabled (' g:python_highlight_builtins' )
45
45
call s: EnableByDefault (' g:python_highlight_builtin_objs' )
46
46
call s: EnableByDefault (' g:python_highlight_builtin_funcs' )
47
+ call s: EnableByDefault (' g:python_highlight_builtin_types' )
47
48
endif
48
49
call s: EnableByDefault (' g:python_highlight_exceptions' )
49
50
call s: EnableByDefault (' g:python_highlight_string_formatting' )
92
93
syn match pythonStatement ' \< async\s\+ def\> ' nextgroup =pythonFunction skipwhite
93
94
syn match pythonStatement ' \< async\s\+ with\> '
94
95
syn match pythonStatement ' \< async\s\+ for\> '
95
- syn cluster pythonExpression contains =pythonStatement,pythonRepeat,pythonConditional,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonBytes,pythonBoolean,pythonNone,pythonBuiltinObj,pythonBuiltinFunc
96
+ syn cluster pythonExpression contains =pythonStatement,pythonRepeat,pythonConditional,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonBytes,pythonBoolean,pythonNone,pythonSingleton, pythonBuiltinObj,pythonBuiltinFunc,pythonBuiltinType
96
97
endif
97
98
98
99
@@ -330,14 +331,13 @@ else
330
331
endif
331
332
332
333
"
333
- " Builtin objects and types
334
+ " Builtin objects
334
335
"
335
336
336
337
if s: Enabled (' g:python_highlight_builtin_objs' )
337
338
syn keyword pythonNone None
338
339
syn keyword pythonBoolean True False
339
- syn keyword pythonBuiltinObj Ellipsis NotImplemented
340
- syn match pythonBuiltinObj ' \v\. @<!<%(object|bool|int|float|tuple|str|list|dict|set|frozenset|bytearray|bytes)>'
340
+ syn keyword pythonSingleton Ellipsis NotImplemented
341
341
syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__
342
342
syn keyword pythonBuiltinObj __loader__ __spec__ __path__ __cached__
343
343
endif
@@ -368,6 +368,15 @@ if s:Enabled('g:python_highlight_builtin_funcs')
368
368
unlet s: funcs_re
369
369
endif
370
370
371
+ "
372
+ " Builtin types
373
+ "
374
+
375
+ if s: Enabled (' g:python_highlight_builtin_types' )
376
+ syn match pythonBuiltinType ' \v\. @<!<%(object|bool|int|float|tuple|str|list|dict|set|frozenset|bytearray|bytes)>'
377
+ endif
378
+
379
+
371
380
"
372
381
" Builtin exceptions and warnings
373
382
"
@@ -469,9 +478,11 @@ if v:version >= 508 || !exists('did_python_syn_inits')
469
478
470
479
HiLink pythonBoolean Boolean
471
480
HiLink pythonNone Constant
481
+ HiLink pythonSingleton Constant
472
482
473
- HiLink pythonBuiltinObj Structure
483
+ HiLink pythonBuiltinObj Identifier
474
484
HiLink pythonBuiltinFunc Function
485
+ HiLink pythonBuiltinType Structure
475
486
476
487
HiLink pythonExClass Structure
477
488
HiLink pythonClassVar Identifier
0 commit comments