rust-analyzer/editors/code/src/commands
Ryan Cumming 6d6cb25cf4 Rich mapping of cargo watch output
Currently we depend on the ASCII rendering string that `rustc` provides
to populate Visual Studio Code's diagnostic. This has a number of
shortcomings:

1. It's not a very good use of space in the error list
2. We can't jump to secondary spans (e.g. where a called function is
   defined)
3. We can't use Code Actions aka Quick Fix

This moves all of the low-level parsing and mapping to a
`rust_diagnostics.ts`. This uses some heuristics to map Rust diagnostics
to VsCode:

1. As before, the Rust diagnostic message and primary span is used for
   the root diagnostic. However, we now just use the message instead of
   the rendered version.

2. Every secondary span is converted to "related information". This
   shows as child in the error list and can be jumped to.

3. Every child diagnostic is categorised in to three buckets:
    1. If they have no span they're treated as another line of the root
       messages
    2. If they have replacement text they're treated as a Code Action
    3. If they have a span but no replacement text they're treated as
       related information (same as secondary spans).
2019-06-25 21:16:04 +10:00
..
analyzer_status.ts align command naming 2019-01-28 15:01:22 +03:00
apply_source_change.ts Prettier fix 2019-01-15 11:15:51 -05:00
cargo_watch.ts Rich mapping of cargo watch output 2019-06-25 21:16:04 +10:00
index.ts switch to official extend selection API 2019-04-21 12:13:48 +03:00
join_lines.ts align command naming 2019-01-28 15:01:22 +03:00
line_buffer.ts Add cargo-watch.check-arguments 2019-04-02 15:03:31 +08:00
matching_brace.ts align command naming 2019-01-28 15:01:22 +03:00
on_enter.ts align command naming 2019-01-28 15:01:22 +03:00
parent_module.ts align command naming 2019-01-28 15:01:22 +03:00
runnables.ts start cargo watch if not started interactively 2019-04-19 20:54:36 +02:00
syntaxTree.ts Rename syntaxtree text provider to SyntaxTreeContentProvider 2019-03-03 22:02:19 +02:00
watch_status.ts Fix code after "apply suggestions" 2019-06-24 13:50:34 +03:00