415: use LSP file system operations r=matklad a=vemoo
implements #131
I've replaced `source_file_edits` and `file_system_edits` with `workspace_edit` because [`WorkspacEdit`](https://docs.rs/languageserver-types/0.53.1/languageserver_types/struct.WorkspaceEdit.html) can represent both.
I only use `document_changes` because `changes` cannot represent file system operations.
But if the client doesn't have the `workspace.workspaceEdit.resourceOperations` capability `WorkspaceEdit` cannot replace the current `FileSystemEdit`. Can we assume that the client will support it?
I also adapted the extension code to make use of the new response type, but only for vscode, i don't know if changes have to be made for the emacs part.
Co-authored-by: Bernardo <berublan@gmail.com>
410: Detangle symbols r=matklad a=matklad
Previously, we used `FileSymbol` both to represent bytes which are stored in the index and as an API of `ra_analysis`. Mixing internal storage format and an API is not a really bright idea, so we introduce `NavigationTarget` to handle API part.
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
408: vscode problem matcher improvements r=matklad a=vemoo
The problem matcher wasn't working properly and looking at the rustc errors i realized it could be simplified.
I also added a new problem matcher that can be used with https://github.com/passcod/cargo-watch to get the errors in the editor on save. To use it one can create a tasks.json file with:
```json
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "cargo watch",
"command": "cargo",
"isBackground": true,
"args": [
"watch",
"-c"
],
"problemMatcher": [
"$rustc-watch"
]
}
]
}
```
I initially implemented it like this: cff9f62d32 but i think there's a bug in vscode so i worked around it by copying the pattern for both problem matchers. The first commit can be used if https://github.com/Microsoft/vscode/pull/65840 is merged.
Co-authored-by: Bernardo <berublan@gmail.com>
406: Simplify r=matklad a=matklad
Get rid of `AnalysisImpl` wrapper around salsa database. It was useful before we migrated by salsa, but it's long have been just a useless boilerplate.
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>