rust/editors/code
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
..
.vscode Run prettier on all files 2018-10-08 22:38:33 +01:00
src Rich mapping of cargo watch output 2019-06-25 21:16:04 +10:00
.gitignore rename all things 2018-09-16 13:07:39 +03:00
.vscodeignore rename all things 2018-09-16 13:07:39 +03:00
package-lock.json Semantic highlighting spike 2019-05-27 11:26:33 +02:00
package.json Fix code after "apply suggestions" 2019-06-24 13:50:34 +03:00
tsconfig.json Run prettier on all files 2018-10-08 22:38:33 +01:00
tslint.json Run prettier on all files 2018-10-08 22:38:33 +01:00