Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/pymode.txt
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,10 @@ Highlight '=' operator *'g:pymode_syntax_highlight_equal_operator'
>
let g:pymode_syntax_highlight_equal_operator = g:pymode_syntax_all

Highlight ':=' operator *'g:pymode_syntax_highlight_walrus_operator'*
>
let g:pymode_syntax_highlight_walrus_operator = g:pymode_syntax_all

Highlight '*' operator *'g:pymode_syntax_highlight_stars_operator'*
>
let g:pymode_syntax_highlight_stars_operator = g:pymode_syntax_all
Expand Down
7 changes: 7 additions & 0 deletions syntax/python.vim
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ call pymode#default("g:pymode_syntax_highlight_async_await", g:pymode_syntax_all
" Highlight '=' operator
call pymode#default('g:pymode_syntax_highlight_equal_operator', g:pymode_syntax_all)

" Highlight ':=' operator
call pymode#default('g:pymode_syntax_highlight_walrus_operator', g:pymode_syntax_all)

" Highlight '*' operator
call pymode#default('g:pymode_syntax_highlight_stars_operator', g:pymode_syntax_all)

Expand Down Expand Up @@ -114,6 +117,10 @@ endif
syn match pythonExtraOperator "\%(=\)"
endif

if g:pymode_syntax_highlight_walrus_operator
syn match pythonExtraOperator "\%(:=\)"
endif

if g:pymode_syntax_highlight_stars_operator
syn match pythonExtraOperator "\%(\*\|\*\*\)"
endif
Expand Down