summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/ale/virtualtext.vim12
-rw-r--r--doc/ale.txt6
2 files changed, 15 insertions, 3 deletions
diff --git a/autoload/ale/virtualtext.vim b/autoload/ale/virtualtext.vim
index 85a12de6..9fa66217 100644
--- a/autoload/ale/virtualtext.vim
+++ b/autoload/ale/virtualtext.vim
@@ -8,6 +8,14 @@ let g:ale_virtualtext_delay = get(g:, 'ale_virtualtext_delay', 10)
let s:cursor_timer = -1
let s:last_pos = [0, 0, 0]
+if !hlexists('ALEVirtualTextWarning')
+ highlight link ALEVirtualTextWarning ALEWarning
+endif
+
+if !hlexists('ALEVirtualTextError')
+ highlight link ALEVirtualTextError ALEError
+endif
+
function! ale#virtualtext#Clear() abort
if !has('nvim-0.3.2')
return
@@ -63,9 +71,9 @@ function! ale#virtualtext#ShowCursorWarning(...) abort
let l:type = get(l:loc, 'type', 'E')
if l:type is# 'E'
- let l:hl_group = 'ALEError'
+ let l:hl_group = 'ALEVirtualTextError'
elseif l:type is# 'W'
- let l:hl_group = 'ALEWarning'
+ let l:hl_group = 'ALEVirtualTextWarning'
endif
call ale#virtualtext#ShowMessage(l:msg, l:hl_group)
diff --git a/doc/ale.txt b/doc/ale.txt
index 85f6b6f8..0fbdcc1b 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -1891,9 +1891,13 @@ g:ale_virtualtext_cursor *g:ale_virtua
Messages can be prefixed prefixed with a string. See |g:ale_virtualtext_prefix|.
+ Message appearance can be changed by modifying these highlight groups:
+ |ALEVirtualTextError| |ALEVirtualTextWarning|
+
+
g:ale_virtualtext_delay *g:ale_virtualtext_delay*
- *b:ale_virtualtext_delay*
+b:ale_virtualtext_delay *b:ale_virtualtext_delay*
Type: |Number|
Default: `10`