diff --git a/mode/python.py b/mode/python.py index 52820d5..7bb02bf 100644 --- a/mode/python.py +++ b/mode/python.py @@ -71,6 +71,7 @@ class PythonGrammar(Grammar): OverridePatternRule('comment', '#@@:(?P[.a-zA-Z0-9_]+):(?P[.a-zA-Z0-9_]+) *$'), PatternRule('comment', '#.*$'), PatternRule('continuation', r'\\\n$'), + PatternRule('decorator', '@[a-zA-Z_][a-zA-Z0-9_]*'), PatternRule('spaces', ' +'), PatternRule('eol', r'\n$'), ] @@ -559,6 +560,7 @@ class Python(mode.Fundamental): colors = { 'python.def': ('blue', 'default', 'bold'), 'python.class': ('yellow', 'default', 'bold'), + 'python.decorator': ('magenta', 'default'), 'python.reserved': ('magenta', 'default', 'bold'), 'python.keyword': ('cyan', 'default', 'bold'), 'python.builtin': ('cyan', 'default', 'bold'),