File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -628,6 +628,10 @@ Highlight "print" as a function *'g:pymode_syntax_print_as_function'*
628
628
>
629
629
let g:pymode_syntax_print_as_function = 0
630
630
631
+ Highlight "async/await" keywords *'g:pymode_syntax_highlight_async_await'*
632
+ >
633
+ let g:pymode_syntax_highlight_async_await = g:pymode_syntax_all
634
+
631
635
Highlight '=' operator *'g:pymode_syntax_highlight_equal_operator'*
632
636
>
633
637
let g:pymode_syntax_highlight_equal_operator = g:pymode_syntax_all
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ call pymode#default('g:pymode_syntax_all', 1)
16
16
17
17
" Highlight 'print' as function
18
18
call pymode#default (" g:pymode_syntax_print_as_function" , 0 )
19
+ "
20
+ " Highlight 'async/await' keywords
21
+ call pymode#default (" g:pymode_syntax_highlight_async_await" , g: pymode_syntax_all )
19
22
20
23
" Highlight '=' operator
21
24
call pymode#default (' g:pymode_syntax_highlight_equal_operator' , g: pymode_syntax_all )
@@ -101,6 +104,13 @@ endif
101
104
syn keyword pythonStatement print
102
105
endif
103
106
107
+ if g: pymode_syntax_highlight_async_await
108
+ syn keyword pythonStatement async await
109
+ syn match pythonStatement " \< async\s\+ def\> " nextgroup =pythonFunction skipwhite
110
+ syn match pythonStatement " \< async\s\+ with\> " display
111
+ syn match pythonStatement " \< async\s\+ for\> " nextgroup =pythonRepeat skipwhite
112
+ endif
113
+
104
114
if g: pymode_syntax_highlight_equal_operator
105
115
syn match pythonExtraOperator " \% (=\) "
106
116
endif
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ describe 'pymode-syntax'
13
13
Expect g: pymode_syntax == 1
14
14
Expect g: pymode_syntax_all == 1
15
15
Expect g: pymode_syntax_print_as_function == 0
16
+ Expect g: pymode_syntax_highlight_async_await == 1
16
17
Expect g: pymode_syntax_highlight_equal_operator == 1
17
18
Expect g: pymode_syntax_highlight_stars_operator == 1
18
19
Expect g: pymode_syntax_highlight_self == 1
You can’t perform that action at this time.
0 commit comments