Merge pull request #528 from jszakmeister/add-highlight-groups
Add highlight groups for the signs and the lines.
This commit is contained in:
commit
034727a04c
@ -92,6 +92,30 @@ Syntastic uses the |:sign| commands to mark lines with errors and warnings in
|
||||
the sign column. To enable this feature, use the |'syntastic_enable_signs'|
|
||||
option.
|
||||
|
||||
Signs are colored using the Error and Todo syntax highlight groups by default.
|
||||
If you wish to customize the colors for the signs, you can use the following
|
||||
groups:
|
||||
SyntasticErrorSign - For syntax errors, links to 'error' by default
|
||||
SyntasticWarningSign - For syntax warnings, links to 'todo' by default
|
||||
SyntasticStyleErrorSign - For style errors, links to 'SyntasticErrorSign'
|
||||
by default
|
||||
SyntasticStyleWarningSign - For style warnings, links to
|
||||
'SyntasticWarningSign' by default
|
||||
|
||||
Example: >
|
||||
highlight SyntasticErrorSign guifg=white guibg=red
|
||||
<
|
||||
To set up highlighting for the line where a sign resides, you can use the
|
||||
following highlight groups:
|
||||
SyntasticErrorLine
|
||||
SyntasticWarningLine
|
||||
SyntasticStyleErrorLine - Links to 'SyntasticErrorLine' by default
|
||||
SyntasticStyleWarningLine - Links to 'SyntasticWarningLine' by default
|
||||
|
||||
Example: >
|
||||
highlight SyntasticErrorLine guibg=#2f0000
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2.3. The error window *:Errors* *syntastic-error-window*
|
||||
|
||||
|
@ -275,10 +275,29 @@ endfunction
|
||||
|
||||
if g:syntastic_enable_signs
|
||||
"define the signs used to display syntax and style errors/warns
|
||||
exe 'sign define SyntasticError text='.g:syntastic_error_symbol.' texthl=error'
|
||||
exe 'sign define SyntasticWarning text='.g:syntastic_warning_symbol.' texthl=todo'
|
||||
exe 'sign define SyntasticStyleError text='.g:syntastic_style_error_symbol.' texthl=error'
|
||||
exe 'sign define SyntasticStyleWarning text='.g:syntastic_style_warning_symbol.' texthl=todo'
|
||||
exe 'sign define SyntasticError text='.g:syntastic_error_symbol.' texthl=SyntasticErrorSign linehl=SyntasticErrorLine'
|
||||
exe 'sign define SyntasticWarning text='.g:syntastic_warning_symbol.' texthl=SyntasticWarningSign linehl=SyntasticWarningLine'
|
||||
exe 'sign define SyntasticStyleError text='.g:syntastic_style_error_symbol.' texthl=SyntasticStyleErrorSign linehl=SyntasticStyleErrorLine'
|
||||
exe 'sign define SyntasticStyleWarning text='.g:syntastic_style_warning_symbol.' texthl=SyntasticStyleWarningSign linehl=SyntasticStyleWarningLine'
|
||||
|
||||
if !hlexists('SyntasticErrorSign')
|
||||
highlight link SyntasticErrorSign error
|
||||
endif
|
||||
if !hlexists('SyntasticWarningSign')
|
||||
highlight link SyntasticWarningSign todo
|
||||
endif
|
||||
if !hlexists('SyntasticStyleErrorSign')
|
||||
highlight link SyntasticStyleErrorSign SyntasticErrorSign
|
||||
endif
|
||||
if !hlexists('SyntasticStyleWarningSign')
|
||||
highlight link SyntasticStyleWarningSign SyntasticWarningSign
|
||||
endif
|
||||
if !hlexists('SyntasticStyleErrorLine')
|
||||
highlight link SyntasticStyleErrorLine SyntasticErrorLine
|
||||
endif
|
||||
if !hlexists('SyntasticStyleWarningLine')
|
||||
highlight link SyntasticStyleWarningLine SyntasticWarningLine
|
||||
endif
|
||||
endif
|
||||
|
||||
"start counting sign ids at 5000, start here to hopefully avoid conflicting
|
||||
|
Loading…
Reference in New Issue
Block a user