@@ -170,6 +170,7 @@ syn keyword pythonException try except finally
170170syn keyword pythonOperator and in is not or
171171syn match pythonStatement " ^\s *yield\> " display
172172
173+ syn match pythonIdentifier " [a-zA-Z_][a-zA-Z0-9_]*" nextgroup =FunctionParameters display
173174
174175if s: Python2Syntax ()
175176 if ! s: Enabled (" g:python_print_as_function" )
@@ -180,8 +181,8 @@ if s:Python2Syntax()
180181else
181182 syn keyword pythonStatement as nonlocal
182183 syn match pythonStatement " \v\s *<yield\s +from>" display
183- syn match pythonFunction " \% ([^[:cntrl:][:space:][:punct:][:digit:]]\| _\)\% ([^[:cntrl:][:punct:][:space:]]\| _\) *" display contained
184184 syn match pythonStatement " \v (\. )@<!<await>"
185+ syn match pythonFunction " [a-zA-Z_][a-zA-Z0-9_]*" nextgroup =FunctionParameters display contained
185186 syn match pythonStatement " \< async\s\+ def\> " nextgroup =pythonFunction skipwhite
186187 syn match pythonStatement " \< async\s\+ with\> " display
187188 syn match pythonStatement " \< async\s\+ for\> " display
@@ -195,7 +196,6 @@ syn region FunctionParameters start='(' end=')' display contains=
195196 \ pythonClassVaraible,
196197 \ pythonConditional,
197198 \ pythonComment,
198- \ pythonImport,
199199 \ pythonOperator,
200200 \ pythonNumber,
201201 \ pythonNumberError,
@@ -214,7 +214,7 @@ syn region FunctionParameters start='(' end=')' display contains=
214214 \ pythonBuiltinObj,
215215 \ pythonBuiltinFunc,
216216 \ pythonBoolean
217- \ nextgroup= OptionalParameters
217+ \ nextgroup= OptionalParameters display contained
218218syn match OptionalParameters / \i *\z e=/ display contained
219219"
220220" Decorators (new in Python 2.4)
@@ -431,7 +431,7 @@ if s:Enabled("g:python_highlight_builtin_objs")
431431 syn keyword pythonBuiltinObj None
432432 syn keyword pythonBoolean True False
433433 syn keyword pythonBuiltinObj Ellipsis NotImplemented
434- syn match pythonBuiltinObj ' \v (\. )@<!<(object|bool|int|float|tuple|str|list|dict|set|frozenset|bytearray|bytes)>'
434+ syn match pythonBuiltinObj ' \v (\. )@<!<(object|bool|int|float|tuple|str|list|dict|set|frozenset|bytearray|bytes)>' nextgroup = FunctionParameters
435435 syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__
436436 syn keyword pythonBuiltinObj __loader__ __spec__ __path__ __cached__
437437endif
0 commit comments