summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcos <cos>2022-02-04 10:25:47 +0100
committercos <cos>2022-02-19 16:53:08 +0100
commit72b145cdf7ccecb935a48f0486c41a0df3aa8859 (patch)
treedaae60d77303d596a1a0ee9085263da7d6af7361
parent6822c4a42437e3b3d002247bf48e4159f062c3b2 (diff)
downloadale-72b145cdf7ccecb935a48f0486c41a0df3aa8859.zip
fixup, wip: Attempt at making cargo working on whole project as documented
Add comments referencing documentation.
-rw-r--r--autoload/ale/handlers/rust.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/autoload/ale/handlers/rust.vim b/autoload/ale/handlers/rust.vim
index 895c7878..60656577 100644
--- a/autoload/ale/handlers/rust.vim
+++ b/autoload/ale/handlers/rust.vim
@@ -28,6 +28,9 @@ endfunction
function! ale#handlers#rust#HandleRustErrors(buffer, lines) abort
let l:output = []
+ " Format of JSON
+ " rustc: https://doc.rust-lang.org/rustc/json.html
+ " cargo: https://doc.rust-lang.org/cargo/reference/external-tools.html#json-messages
for l:errorline in a:lines
" ignore everything that is not JSON
if l:errorline !~# '^{'
@@ -60,6 +63,7 @@ function! ale#handlers#rust#HandleRustErrors(buffer, lines) abort
endif
if !empty(l:span)
+ " :help ale-loclist-format
let l:output_line = {
\ 'filename': l:span.file_name,
\ 'lnum': l:span.line_start,