File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -192,9 +192,10 @@ patterns:
192192 - include : $self
193193
194194- name : meta.function.python
195- begin : \s*((?: async\s+)?def)\s+(?=[[:alpha:]_][[:alnum:]_]*)
195+ begin : \s*(?:( async) \s+)?( def)\s+(?=[[:alpha:]_][[:alnum:]_]*)
196196 beginCaptures :
197- ' 1 ' : {name: storage.type.function.python}
197+ ' 1 ' : {name: storage.modifier.async.python}
198+ ' 2 ' : {name: storage.type.function.python}
198199 end : (\()|\s*($\n?|#.*$\n?)
199200 endCaptures :
200201 ' 1 ' : {name: punctuation.definition.parameters.begin.python}
@@ -206,9 +207,11 @@ patterns:
206207 patterns :
207208 - include : ' #entity_name_function'
208209
209- - match : \b(((?:async\s+)?def)|lambda)\b
210- captures :
211- ' 1 ' : {name: storage.type.function.python}
210+ - match : \b(?:(?:(async)\s+)?(def)|(lambda))\b
211+ captures :
212+ ' 1 ' : {name: storage.modifier.async.python}
213+ ' 2 ' : {name: storage.type.function.python}
214+ ' 3 ' : {name: storage.type.function.inline.python}
212215
213216- comment : ' Keywords that delimit flow blocks or alter flow from within a
214217 block. This block should be matched *after* meta.function.python to
You can’t perform that action at this time.
0 commit comments