@@ -54,6 +54,7 @@ if s:Enabled('g:python_highlight_all')
54
54
call s: EnableByDefault (' g:python_highlight_space_errors' )
55
55
call s: EnableByDefault (' g:python_highlight_doctests' )
56
56
call s: EnableByDefault (' g:python_print_as_function' )
57
+ call s: EnableByDefault (' g:python_highlight_func_calls' )
57
58
call s: EnableByDefault (' g:python_highlight_class_vars' )
58
59
call s: EnableByDefault (' g:python_highlight_operators' )
59
60
endif
64
65
65
66
syn keyword pythonStatement break continue del return pass yield global assert lambda with
66
67
syn keyword pythonStatement raise nextgroup =pythonExClass skipwhite
67
- syn keyword pythonStatement def class nextgroup =pythonFunction skipwhite
68
+ syn keyword pythonStatement def class nextgroup =pythonFunctionContained skipwhite
68
69
if s: Enabled (' g:python_highlight_class_vars' )
69
70
syn keyword pythonClassVar self cls
70
71
endif
@@ -85,12 +86,12 @@ if s:Python2Syntax()
85
86
endif
86
87
syn keyword pythonStatement exec
87
88
syn keyword pythonImport as
88
- syn match pythonFunction ' [a-zA-Z_][a-zA-Z0-9_]*' display contained
89
+ syn match pythonFunctionContained ' [a-zA-Z_][a-zA-Z0-9_]*' display contained
89
90
else
90
91
syn keyword pythonStatement as nonlocal
91
92
syn match pythonStatement ' \v\. @<!<await>'
92
- syn match pythonFunction ' \% ([^[:cntrl:][:space:][:punct:][:digit:]]\| _\)\% ([^[:cntrl:][:punct:][:space:]]\| _\) *' display contained
93
- syn match pythonStatement ' \< async\s\+ def\> ' nextgroup =pythonFunction skipwhite
93
+ syn match pythonFunctionContained ' \% ([^[:cntrl:][:space:][:punct:][:digit:]]\| _\)\% ([^[:cntrl:][:punct:][:space:]]\| _\) *' display contained
94
+ syn match pythonStatement ' \< async\s\+ def\> ' nextgroup =pythonFunctionContained skipwhite
94
95
syn match pythonStatement ' \< async\s\+ with\> '
95
96
syn match pythonStatement ' \< async\s\+ for\> '
96
97
syn cluster pythonExpression contains =pythonStatement,pythonRepeat,pythonConditional,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonBytes,pythonBoolean,pythonNone,pythonSingleton,pythonBuiltinObj,pythonBuiltinFunc,pythonBuiltinType
@@ -394,6 +395,18 @@ if s:Enabled('g:python_highlight_exceptions')
394
395
unlet s: exs_re
395
396
endif
396
397
398
+ "
399
+ " Function calls
400
+ "
401
+
402
+ if s: Enabled (' g:python_highlight_func_calls' )
403
+ syn match pythonFunctionCall ' \% ([^[:cntrl:][:space:][:punct:][:digit:]]\| _\)\% ([^[:cntrl:][:punct:][:space:]]\| _\) *\z e\% (\s *(\) '
404
+ endif
405
+
406
+ "
407
+ " Misc
408
+ "
409
+
397
410
if s: Enabled (' g:python_slow_sync' )
398
411
syn sync minlines =2000
399
412
else
@@ -415,7 +428,8 @@ if v:version >= 508 || !exists('did_python_syn_inits')
415
428
HiLink pythonStatement Statement
416
429
HiLink pythonRaiseFromStatement Statement
417
430
HiLink pythonImport Include
418
- HiLink pythonFunction Function
431
+ HiLink pythonFunctionContained Function
432
+ HiLink pythonFunctionCall Function
419
433
HiLink pythonConditional Conditional
420
434
HiLink pythonRepeat Repeat
421
435
HiLink pythonException Exception
0 commit comments