summaryrefslogtreecommitdiff
path: root/plugin/ale.vim
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-02-13 00:18:51 +0000
committerw0rp <devw0rp@gmail.com>2017-02-13 00:24:25 +0000
commit3aa1d57b5715b18f1544d36a3101ff45a6a86239 (patch)
tree54b37940138ee2d587b3bcea34bbd0443d630de9 /plugin/ale.vim
parenta995daa82704740717377e1d9c03785b9b3f2a63 (diff)
downloadale-3aa1d57b5715b18f1544d36a3101ff45a6a86239.zip
Fix #171 - Implement basic error highlighting
Diffstat (limited to 'plugin/ale.vim')
-rw-r--r--plugin/ale.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugin/ale.vim b/plugin/ale.vim
index d65a99cb..6afa603b 100644
--- a/plugin/ale.vim
+++ b/plugin/ale.vim
@@ -81,6 +81,9 @@ let g:ale_keep_list_window_open = get(g:, 'ale_keep_list_window_open', 0)
" This is enabled by default only if the 'signs' feature exists.
let g:ale_set_signs = get(g:, 'ale_set_signs', has('signs'))
+" This flag can be set to 0 to disable setting error highlights.
+let g:ale_set_highlights = get(g:, 'ale_set_highlights', has('syntax'))
+
" These variables dicatate what sign is used to indicate errors and warnings.
let g:ale_sign_error = get(g:, 'ale_sign_error', '>>')
let g:ale_sign_warning = get(g:, 'ale_sign_warning', '--')
@@ -161,6 +164,11 @@ function! s:ALEToggle() abort
" Clear signs, loclist, quicklist
call ale#engine#SetResults(l:buffer, [])
endfor
+
+ " Remove highlights for the current buffer now.
+ if g:ale_set_higlights
+ call ale#highlight#UpdateHighlights()
+ endif
endif
call s:ALEInitAuGroups()