diff --git a/doc/syntastic.txt b/doc/syntastic.txt index f0cede36..68aa176b 100644 --- a/doc/syntastic.txt +++ b/doc/syntastic.txt @@ -163,6 +163,20 @@ syntax errors: > let g:syntastic_enable_signs=1 < + *'syntastic_error_symbol'* +Default: '>>' +Use this option to control what the syntastic |:sign| text contains. Several +error symobls can be customized: + syntastic_error_symbol - For syntax errors, defaults to '>>' + syntastic_style_error_symbol - For style errors, defaults to 'S>' + syntastic_warning_symbol - For syntax warnings, defaults to '>>' + syntastic_style_warning_symbol - For style warnings, defaults to 'S>' + +Example: > + let g:syntastic_error_symbol='✗' + let g:syntastic_warning_symbol='⚠' +< + *'syntastic_enable_balloons'* Default: 1 Use this option to tell syntastic whether to display error messages in balloons diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index d9a1c04d..1aca5aae 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -26,6 +26,23 @@ endif if !exists("g:syntastic_enable_signs") let g:syntastic_enable_signs = 1 endif + +if !exists("g:syntastic_error_symbol") + let g:syntastic_error_symbol = '>>' +endif + +if !exists("g:syntastic_warning_symbol") + let g:syntastic_warning_symbol = '>>' +endif + +if !exists("g:syntastic_style_error_symbol") + let g:syntastic_style_error_symbol = 'S>' +endif + +if !exists("g:syntastic_style_warning_symbol") + let g:syntastic_style_warning_symbol = 'S>' +endif + if !has('signs') let g:syntastic_enable_signs = 0 endif @@ -274,10 +291,10 @@ endfunction if g:syntastic_enable_signs "define the signs used to display syntax and style errors/warns - sign define SyntasticError text=>> texthl=error - sign define SyntasticWarning text=>> texthl=todo - sign define SyntasticStyleError text=S> texthl=error - sign define SyntasticStyleWarning text=S> texthl=todo + 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' endif "start counting sign ids at 5000, start here to hopefully avoid conflicting