mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Close #4401 - Use subtle defaults for virtual-text
Default virtual-text to the Comment highlight group and prefix virtual-text messages with comment text for each language by default. Messages can now be formatted with `%type%` to print the error type. The Vim 9.0 version has been updated in the Docker image to add test coverage for virtual-text.
This commit is contained in:
@@ -254,6 +254,7 @@ function! ale#GetLocItemMessage(item, format_string) abort
|
||||
" \=l:variable is used to avoid escaping issues.
|
||||
let l:msg = substitute(l:msg, '\v\%([^\%]*)code([^\%]*)\%', l:code_repl, 'g')
|
||||
let l:msg = substitute(l:msg, '\V%severity%', '\=l:severity', 'g')
|
||||
let l:msg = substitute(l:msg, '\V%type%', '\=l:type', 'g')
|
||||
let l:msg = substitute(l:msg, '\V%linter%', '\=l:linter_name', 'g')
|
||||
" Replace %s with the text.
|
||||
let l:msg = substitute(l:msg, '\V%s', '\=a:item.text', 'g')
|
||||
|
||||
Reference in New Issue
Block a user