intorust / intorust.vscode

A VSCode extension for learning Rust
Other
9 stars 2 forks source link

Default to error from current line if command is invoked manually #5

Open nikomatsakis opened 4 weeks ago

nikomatsakis commented 4 weeks ago

If you invoke the explainErrors command via the command palette, right now it will supply no error messages at all:

https://github.com/nikomatsakis/intorust.vscode/blob/ffff983688652133fe4a5fc80221fba683a6e6f5/src/extension.ts#L32-L34

It should really go looking at the current diagnostics to find whatever error(s) are on the current line. The codelens code is probably a good starting point:

https://github.com/nikomatsakis/intorust.vscode/blob/ffff983688652133fe4a5fc80221fba683a6e6f5/src/codelens.ts#L25