Skip to content

Commit d9616c9

Browse files
committed
Add logger highlight
1 parent 57cbc96 commit d9616c9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

syntax/python.vim

+8
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ if s:Enabled('g:python_highlight_all')
5252
call s:EnableByDefault('g:python_highlight_func_calls')
5353
call s:EnableByDefault('g:python_highlight_class_vars')
5454
call s:EnableByDefault('g:python_highlight_operators')
55+
call s:EnableByDefault('g:python_highlight_logger')
5556
call s:EnableByDefault('g:python_highlight_brackets')
5657
endif
5758

@@ -90,6 +91,9 @@ syn keyword pythonInclude import
9091
syn keyword pythonImport import
9192
syn match pythonRaiseFromStatement '\<from\>'
9293
syn match pythonImport '^\s*\zsfrom\>'
94+
if s:Enabled('g:python_highlight_logger')
95+
syn keyword pythonLog log _log __log LOG _LOG __LOG logger
96+
endif
9397
if s:Enabled('g:python_highlight_brackets')
9498
syn match pythonBrackets '[()\[\]{},:]\|->'
9599
endif
@@ -514,6 +518,10 @@ if v:version >= 508 || !exists('did_python_syn_inits')
514518
HiLink pythonClass Structure
515519
HiLink pythonClassVar Identifier
516520

521+
if s:Enabled('g:python_highlight_logger')
522+
HiLink pythonLog Identifier
523+
endif
524+
517525
delcommand HiLink
518526
endif
519527

0 commit comments

Comments
 (0)