rust/crates
bors c9b4116a5e Auto merge of #14662 - Ddystopia:open_locally_built_documentatin_instead_of_docs_dot_rs, r=Ddystopia
Provide links to locally built documentation for `experimental/externalDocs`

This pull request addresses issue #12867, which requested the ability to provide links to locally built documentation when using the "Open docs for symbol" feature. Previously, rust-analyzer always used docs.rs for this purpose. With these changes, the feature will provide both web (docs.rs) and local documentation links without verifying their existence.

Changes in this PR:

   - Added support for local documentation links alongside web documentation links.
   - Added `target_dir` path argument for external_docs and other related methods.
   - Added `sysroot` argument for external_docs.
   - Added `target_directory` path to `CargoWorkspace`.

API Changes:

   - Added an experimental client capability `{ "localDocs": boolean }`. If this capability is set, the `Open External Documentation` request returned from the server will include both web and local documentation links in the `ExternalDocsResponse` object.

Here's the `ExternalDocsResponse` interface:

```typescript
interface ExternalDocsResponse {
    web?: string;
    local?: string;
}
```

By providing links to both web-based and locally built documentation, this update improves the developer experience for those using different versions of crates, git dependencies, or local crates not available on docs.rs. Rust-analyzer will now provide both web (docs.rs) and local documentation links, leaving it to the client to open the desired link. Please note that this update does not perform any checks to ensure the validity of the provided links.
2023-05-02 15:57:19 +00:00
..
base-db accepting review suggestions 2023-05-02 11:01:41 -03:00
cfg
flycheck
hir Auto merge of #14715 - Veykril:symbol-index, r=Veykril 2023-05-02 10:34:53 +00:00
hir-def fix break-outside-of-loop false positive in try block 2023-05-02 03:11:56 +03:30
hir-expand Auto merge of #14651 - Veykril:workspace-vscode-fix, r=Veykril 2023-04-25 09:09:31 +00:00
hir-ty Don't merge trait_impls_in_deps results 2023-05-02 14:00:18 +02:00
ide Workspace without sysroot could be possible 2023-05-02 17:24:00 +02:00
ide-assists fix: generate delegate methods filters out functions that already exist 2023-05-02 03:36:35 +00:00
ide-completion Auto merge of #14513 - hecatia-elegua:alias-based-completion2, r=Veykril 2023-04-24 06:34:25 +00:00
ide-db Refactor symbol index 2023-05-02 12:11:42 +02:00
ide-diagnostics fix break-outside-of-loop false positive in try block 2023-05-02 03:11:56 +03:30
ide-ssr internal: Arc<String> -> Arc<str> 2023-04-22 09:48:37 +02:00
intern
limit Move Expander and LowerCtx into separate modules 2023-04-17 20:44:06 +02:00
mbe Use boxed slices instead ovecs in decl macros 2023-05-02 17:04:53 +02:00
parser fix: Fix pat fragment handling in 2021 edition 2023-04-24 22:21:37 +02:00
paths accepting review suggestions 2023-05-02 11:01:41 -03:00
proc-macro-api Remove proc-macro server command from the rust-analyzer binary 2023-04-26 08:19:28 +02:00
proc-macro-srv
proc-macro-srv-cli Remove proc-macro server command from the rust-analyzer binary 2023-04-26 08:19:28 +02:00
proc-macro-test
profile internal: Add some additional status ouput 2023-04-22 09:34:47 +02:00
project-model Add target_directory path to CargoWorkspace 2023-05-02 17:06:31 +02:00
rust-analyzer Workspace without sysroot could be possible 2023-05-02 17:24:00 +02:00
sourcegen
stdx
syntax Auto merge of #14622 - alibektas:make_ty_alias, r=alibektas 2023-04-22 11:43:42 +00:00
test-utils Highlight closure captures when cursor is on pipe 2023-05-02 08:59:40 +02:00
text-edit
toolchain
tt
vfs Adding crate_root_path to crate_graph 2023-05-02 10:59:31 -03:00
vfs-notify