diff options
author | w0rp <w0rp@users.noreply.github.com> | 2019-06-08 23:20:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-08 23:20:18 +0100 |
commit | d9931b98910a64b81499ef9ae9d95ac4d446c67f (patch) | |
tree | 4fbec01179a5f8090b7a9b8f13867218392ef614 /autoload | |
parent | 3aa58ca1796a57707e321645c4d9a49c84f5fdb4 (diff) | |
parent | e7317e05ea3e18d39feb4620a93c8ceec25d8a43 (diff) | |
download | ale-d9931b98910a64b81499ef9ae9d95ac4d446c67f.zip |
Merge pull request #2559 from nerdrew/rust-cargo-rendered-detail
show rendered cargo error in detail for clippy errors
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/handlers/rust.vim | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/autoload/ale/handlers/rust.vim b/autoload/ale/handlers/rust.vim index dda6466e..a7fac464 100644 --- a/autoload/ale/handlers/rust.vim +++ b/autoload/ale/handlers/rust.vim @@ -56,14 +56,20 @@ function! ale#handlers#rust#HandleRustErrors(buffer, lines) abort endif if !empty(l:span) - call add(l:output, { + let l:output_line = { \ 'lnum': l:span.line_start, \ 'end_lnum': l:span.line_end, \ 'col': l:span.column_start, \ 'end_col': l:span.column_end-1, \ 'text': empty(l:span.label) ? l:error.message : printf('%s: %s', l:error.message, l:span.label), \ 'type': toupper(l:error.level[0]), - \}) + \} + + if has_key(l:error, 'rendered') && !empty(l:error.rendered) + let l:output_line.detail = l:error.rendered + endif + + call add(l:output, l:output_line) endif endfor endfor |