]> git.lizzy.rs Git - rust.git/commitdiff
Merge #1079
authorbors[bot] <bors[bot]@users.noreply.github.com>
Tue, 2 Apr 2019 10:10:26 +0000 (10:10 +0000)
committerbors[bot] <bors[bot]@users.noreply.github.com>
Tue, 2 Apr 2019 10:10:26 +0000 (10:10 +0000)
1079: Improve cargo-watch usage in vscode plugin r=matklad a=edwin0cheng

*This PR try to improve current cargo-watch usage in VSCode :*

1. Add Multi-lines error support :
![multilines-error](https://i.imgur.com/gbLEwMG.gif)

2. Add cargo-watch status animation :
![cargo-watch-status](https://i.imgur.com/GbHwzjj.gif)

*Implementation Details*

* Current VSCode `ProblemMatcher` still do not support multiple line parsing.
* However we can, spawn a cargo watch process instead of using vscode.Task to allow more control.
* Use `cargo-check --message-format json` to get json format of compiler-message.
* Use `vscode.DiagnosticCollection` to manage the problems directly, which allow multiple lines diagnostic.

However,
* VSCode use non mono-space font for problems, at this moment i cannot find a good solution about it.
* I am not so good in typescript, please let me know if anything is bad in this PR.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Co-authored-by: Edwin Cheng <edwin@m-inverse.com>

Trivial merge