Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Opening docs (rust-analyzer.openDocs) was broken by commit 1410329. This commit contains changes preparing for the rust-analyzer "localDocs" feature https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/lsp-extensions.md#local-documentation However, this feature is only activated by specifying the "localDocs" capability. This commits does so in src/client.ts.
To actually make use of the local documentation, the src/commands.ts:openDocs function also needs adjustment. I wrote it such that if a local URI is provided and a corresponding file exists, it is opened.
Otherwise, if a web link is provided, this link is opened.
Note that "vscode.open" would open the local URI in the editor instead of the browser.
Whether local documentation exists depends on whether 'cargo doc' has been executed. If it has been executed but not recently, the documentation might be outdated, so it might be reasonable to generate local documentation before trying to open it.
This is not done so far, but could be added.
It might make sense to run 'cargo doc --no-deps'.