Skip to content

Commit 16b4d50

Browse files
author
MattDMo
committed
REALLY fixed #52 this time
1 parent 6789773 commit 16b4d50

File tree

2 files changed

+270
-145
lines changed

2 files changed

+270
-145
lines changed

PythonImproved.YAML-tmLanguage

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,26 @@ patterns:
306306

307307
- include: '#magic_variable_names'
308308

309+
- name: meta.function-call.python
310+
begin: (self|cls)\s*(?=(\())
311+
beginCaptures:
312+
'1': {name: variable.language.python}
313+
'2': {name: punctuation.definition.arguments.begin.python}
314+
end: (\))
315+
endCaptures:
316+
'1': {name: punctuation.definition.arguments.end.python}
317+
patterns:
318+
- contentName: meta.function-call.arguments.python
319+
begin: (\()
320+
beginCaptures:
321+
'1': {name: punctuation.definition.arguments.begin.python}
322+
end: (?=(\)))
323+
endCaptures:
324+
'1': {name: punctuation.definition.arguments.end.python}
325+
patterns:
326+
- include: '#keyword_arguments'
327+
- include: $self
328+
309329
# this needs to be here, or else cls() is a reg. function and self.foo is not highlighted
310330
- include: '#language_variables'
311331

0 commit comments

Comments
 (0)