|
72 | 72 | " objects |
73 | 73 | " python_highlight_builtin_objs Highlight builtin objects only |
74 | 74 | " python_highlight_builtin_funcs Highlight builtin functions only |
| 75 | +" python_highlight_self Highlight self and cls attributes |
75 | 76 | " python_highlight_exceptions Highlight standard exceptions |
76 | 77 | " python_highlight_string_formatting Highlight % string formatting |
77 | 78 | " python_highlight_string_format Highlight str.format syntax |
@@ -139,6 +140,7 @@ if s:Enabled("g:python_highlight_all") |
139 | 140 | call s:EnableByDefault("g:python_highlight_builtin_objs") |
140 | 141 | call s:EnableByDefault("g:python_highlight_builtin_funcs") |
141 | 142 | endif |
| 143 | + call s:EnableByDefault("g:python_highlight_self") |
142 | 144 | call s:EnableByDefault("g:python_highlight_exceptions") |
143 | 145 | call s:EnableByDefault("g:python_highlight_string_formatting") |
144 | 146 | call s:EnableByDefault("g:python_highlight_string_format") |
@@ -417,6 +419,14 @@ if s:Enabled("g:python_highlight_builtin_objs") |
417 | 419 | syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__ |
418 | 420 | endif |
419 | 421 |
|
| 422 | +" |
| 423 | +" Self and cls |
| 424 | +" |
| 425 | + |
| 426 | +if s:Enabled("g:python_highlight_self") |
| 427 | + syn keyword pythonSelf self cls |
| 428 | +endif |
| 429 | + |
420 | 430 | " |
421 | 431 | " Builtin functions |
422 | 432 | " |
@@ -573,6 +583,8 @@ if version >= 508 || !exists("did_python_syn_inits") |
573 | 583 | HiLink pythonBuiltinObj Structure |
574 | 584 | HiLink pythonBuiltinFunc Function |
575 | 585 |
|
| 586 | + HiLink pythonSelf Identifier |
| 587 | + |
576 | 588 | HiLink pythonExClass Structure |
577 | 589 |
|
578 | 590 | delcommand HiLink |
|
0 commit comments