Skip to content

Commit ee9abbf

Browse files
committed
Add logger highlight
1 parent 3f08e2f commit ee9abbf

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

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

519+
if s:Enabled('g:python_highlight_logger')
520+
HiLink pythonLog Identifier
521+
endif
522+
515523
delcommand HiLink
516524
endif
517525

0 commit comments

Comments
 (0)