improve the lsp diagnostic message format (#2425)

This commit is contained in:
Jethro Shuwen Sun
2019-04-15 09:36:18 -04:00
committed by w0rp
parent 61c1ddd904
commit 7f31065fce
2 changed files with 21 additions and 1 deletions

View File

@@ -28,7 +28,7 @@ function! ale#lsp#response#ReadDiagnostics(response) abort
for l:diagnostic in a:response.params.diagnostics
let l:severity = get(l:diagnostic, 'severity', 0)
let l:loclist_item = {
\ 'text': l:diagnostic.message,
\ 'text': substitute(l:diagnostic.message, '\(\r\n\|\n\|\r\)', ' ', 'g'),
\ 'type': 'E',
\ 'lnum': l:diagnostic.range.start.line + 1,
\ 'col': l:diagnostic.range.start.character + 1,