summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Emmott <fe@fb.com>2018-08-15 14:31:30 -0700
committerFred Emmott <fe@fb.com>2018-08-15 14:31:30 -0700
commitc467db3ed99dc7c911ddb1fefa9d66ac84fc76a6 (patch)
treebe0cc06d20d17aa92cb32fb193a05a5e17440588
parent484a70f0c0c9109ab6825fa67e481d862237207c (diff)
downloadale-c467db3ed99dc7c911ddb1fefa9d66ac84fc76a6.zip
Better formatting
-rw-r--r--autoload/ale/lsp/response.vim6
-rw-r--r--test/lsp/test_read_lsp_diagnostics.vader2
2 files changed, 4 insertions, 4 deletions
diff --git a/autoload/ale/lsp/response.vim b/autoload/ale/lsp/response.vim
index 7984369d..4b895ac7 100644
--- a/autoload/ale/lsp/response.vim
+++ b/autoload/ale/lsp/response.vim
@@ -58,11 +58,11 @@ function! ale#lsp#response#ReadDiagnostics(response) abort
if has_key(l:diagnostic, 'relatedInformation')
let l:related = deepcopy(l:diagnostic.relatedInformation)
call map(l:related, {key, val ->
- \ ale#path#FromURI(val.location.uri)) .
+ \ ale#path#FromURI(val.location.uri) .
\ ':' . val.location.range.start.line . ':' . val.location.range.start.character .
- \ ': ' . val.message
+ \ ":\n\t" . val.message
\ })
- let l:loclist_item.detail = join(l:related, "\n") . "\n"
+ let l:loclist_item.detail = l:diagnostic.message . "\n" . join(l:related, "\n") . "\n"
endif
call add(l:loclist, l:loclist_item)
diff --git a/test/lsp/test_read_lsp_diagnostics.vader b/test/lsp/test_read_lsp_diagnostics.vader
index c1df55f0..6708ad2f 100644
--- a/test/lsp/test_read_lsp_diagnostics.vader
+++ b/test/lsp/test_read_lsp_diagnostics.vader
@@ -165,7 +165,7 @@ Execute(ale#lsp#response#ReadDiagnostics() should use relatedInformation for det
\ {
\ 'range': Range(0, 2, 0, 2),
\ 'message': 'Something went wrong!',
- \ 'detail': 'file:///tmp/someotherfile.txt:42:79: might be this'
+ \ 'detail': "Something went wrong!\n/tmp/someotherfile.txt:42:79:\n\tmight be this"
\ }
\ ]}})