Skip to content

Commit 8318c16

Browse files
committed
builtins now show up in function definitions
1 parent 84d1a41 commit 8318c16

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

AUTHORS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Contributors:
77

88
* Alvin Francis (alvinfrancis);
99
* Anler Hp (ikame);
10-
* Anton Parkhomenko
10+
* Anton Parkhomenko (chuwy);
1111
* Benjamin Ruston (bruston);
1212
* Boris Filippov (frenzykryger);
1313
* David Vogt (winged);
@@ -20,10 +20,11 @@ Contributors:
2020
* Kevin Deldycke (kdeldycke);
2121
* Lowe Thiderman (thiderman);
2222
* Martin Brochhaus (mbrochh);
23-
* Matthew Moses (mlmoses)
23+
* Matthew Moses (mlmoses);
2424
* Mohammed (mbadran);
2525
* Naoya Inada (naoina);
2626
* Pedro Algarvio (s0undt3ch);
27+
* Phillip Cloud (cpcloud);
2728
* Piet Delport (pjdelport);
2829
* Robert David Grant (bgrant);
2930
* Ronald Andreu Kaiser (cathoderay);

syntax/python.vim

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,16 @@ endif
7272
syn keyword pythonStatement exec return
7373
syn keyword pythonStatement pass raise
7474
syn keyword pythonStatement global nonlocal assert
75-
syn keyword pythonStatement lambda yield
75+
syn keyword pythonStatement yield
76+
syn keyword pythonLambdaExpr lambda
7677
syn keyword pythonStatement with as
7778

7879
syn keyword pythonStatement def nextgroup=pythonFunction skipwhite
7980
syn match pythonFunction "\%(\%(def\s\|@\)\s*\)\@<=\h\%(\w\|\.\)*" contained nextgroup=pythonVars
8081
syn region pythonVars start="(" end=")" contained contains=pythonParameters transparent keepend
81-
syn match pythonParameters "[^,]*" contained contains=pythonExtraOperator,pythonParam skipwhite
82-
syn match pythonParam "=[^,]*" contained contains=pythonBuiltinObj,pythonBuiltinType,pythonConstant,pythonStatement,pythonNumber,pythonString,pythonNumber,pythonBrackets skipwhite
83-
syn match pythonBrackets "[(|)]" contained skipwhite
82+
syn match pythonParameters "[^,]*" contained contains=pythonParam skipwhite
83+
syn match pythonParam "[^,]*" contained contains=pythonExtraOperator,pythonLambdaExpr,pythonBuiltinObj,pythonBuiltinType,pythonConstant,pythonString,pythonNumber,pythonBrackets,pythonSelf skipwhite
84+
syn match pythonBrackets "{[(|)]}" contained skipwhite
8485

8586
syn keyword pythonStatement class nextgroup=pythonClass skipwhite
8687
syn match pythonClass "\%(\%(class\s\)\s*\)\@<=\h\%(\w\|\.\)*" contained nextgroup=pythonClassVars
@@ -325,6 +326,7 @@ endif
325326
" =============
326327

327328
hi def link pythonStatement Statement
329+
hi def link pythonLambdaExpr Statement
328330
hi def link pythonInclude Include
329331
hi def link pythonFunction Function
330332
hi def link pythonClass Type

0 commit comments

Comments
 (0)