mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-23 04:21:26 +08:00
Close #1559 - Report errors from LSP servers in :ALEInfo
This commit is contained in:
@@ -168,6 +168,30 @@ function! s:EchoLinterAliases(all_linters) abort
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! s:EchoLSPErrorMessages(all_linter_names) abort
|
||||
let l:lsp_error_messages = get(g:, 'ale_lsp_error_messages', {})
|
||||
let l:header_echoed = 0
|
||||
|
||||
for l:linter_name in a:all_linter_names
|
||||
let l:error_list = get(l:lsp_error_messages, l:linter_name, [])
|
||||
|
||||
if !empty(l:error_list)
|
||||
if !l:header_echoed
|
||||
call s:Echo(' LSP Error Messages:')
|
||||
call s:Echo('')
|
||||
endif
|
||||
|
||||
call s:Echo('(Errors for ' . l:linter_name . ')')
|
||||
|
||||
for l:message in l:error_list
|
||||
for l:line in split(l:message, "\n")
|
||||
call s:Echo(l:line)
|
||||
endfor
|
||||
endfor
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! ale#debugging#Info() abort
|
||||
let l:filetype = &filetype
|
||||
|
||||
@@ -200,6 +224,7 @@ function! ale#debugging#Info() abort
|
||||
call s:Echo(' Global Variables:')
|
||||
call s:Echo('')
|
||||
call s:EchoGlobalVariables()
|
||||
call s:EchoLSPErrorMessages(l:all_names)
|
||||
call s:Echo(' Command History:')
|
||||
call s:Echo('')
|
||||
call s:EchoCommandHistory()
|
||||
|
||||
Reference in New Issue
Block a user