Commit Graph

25180 Commits

Author SHA1 Message Date
bors
60f4b3e26e Auto merge of #14726 - Veykril:cistuff, r=lnicola
minor: Lock paths-filter action to a specific commit
2023-05-03 11:46:48 +00:00
Lukas Wirth
928a378c6d Lock paths-filter action to a specific commit 2023-05-03 13:36:04 +02:00
hkalbasi
d9f4cbbe8f Emit function bodies in expanding builtin derives 2023-05-03 14:14:47 +03:30
bors
9811a3af5f Auto merge of #14718 - lnicola:triomphe, r=Veykril
internal: Use `triomphe::Arc`

Closes #14717
2023-05-02 21:21:56 +00:00
Laurențiu Nicola
7197a27028 Use triomphe Arc 2023-05-02 20:02:43 +03:00
bors
a7168a8c6f Auto merge of #14712 - Veykril:metadata-extra-args, r=Veykril
fix: Only pass unstable flags to cargo metadata from extra args config
2023-05-02 16:34:39 +00:00
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
Lukas Wirth
16b3febcf5 Only pass unstable flags to cargo metadata from extra args config 2023-05-02 17:33:58 +02:00
Ddystopia
2025f17ac3
Workspace without sysroot could be possible 2023-05-02 17:24:00 +02:00
Ddystopia
7e19d99d4f
Add a localDocs capability 2023-05-02 17:13:21 +02:00
Ddystopia
4ac39f0c98
Propagating sysroot down + Refactoring 2023-05-02 17:08:56 +02:00
Ddystopia
67e58c5ba6
Add sysroot 2023-05-02 17:08:56 +02:00
Ddystopia
396934860c
Getting cargo workspace from file_id and refactoring 2023-05-02 17:08:56 +02:00
Oleksandr Babak
0913809ac8
Update crates/ide/src/doc_links.rs
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2023-05-02 17:08:55 +02:00
Ddystopia
8317c8db1a
Test for Builtin Type 2023-05-02 17:08:55 +02:00
Ddystopia
b74b9797bc
Update hash in lsp-extensions.md 2023-05-02 17:08:54 +02:00
Ddystopia
b64c31c40a
Solve platform-specific issues 2023-05-02 17:06:39 +02:00
Ddystopia
12292e445a
Tests for externalDocs 2023-05-02 17:06:39 +02:00
Ddystopia
da0ffe79d0
Change signature of externalDocs in lsp-extensions 2023-05-02 17:06:39 +02:00
Ddystopia
2503fbefde
Small improvements and fixes 2023-05-02 17:06:39 +02:00
Ddystopia
3fbb48907e
Add doc strings 2023-05-02 17:06:39 +02:00
Ddystopia
c47a34fddc
Add target_dir path argument for external_docs and other methods 2023-05-02 17:06:38 +02:00
Ddystopia
f2d933ecaf
Add support for local documentation links alongside web documentation links, pending for target_dir path and tests 2023-05-02 17:06:38 +02:00
Ddystopia
fc888b583d
Add target_directory path to CargoWorkspace 2023-05-02 17:06:31 +02:00
bors
4ecd7e6c0d Auto merge of #14720 - Veykril:boxed-slices, r=Veykril
internal: Use boxed slices instead ovecs in decl macros

saves another 10 mb on self (since we didn't shrink the vecs)
2023-05-02 15:05:28 +00:00
Lukas Wirth
90499d4390 Use boxed slices instead ovecs in decl macros 2023-05-02 17:04:53 +02:00
bors
a48e0e14e1 Auto merge of #11557 - bruno-ortiz:rust-dependencies, r=bruno-ortiz
Creating rust dependencies tree explorer

Hello!

I tried to implement a tree view that shows the dependencies of a project.

It allows to see all dependencies to the project and it uses `cargo tree` for it. Also it allows to click and open the files, the viewtree tries its best to follow the openned file in the editor.

Here is an example:
![image](https://user-images.githubusercontent.com/5748995/155822183-1e227c7b-7929-4fc8-8eed-29ccfc5e14fe.png)

Any feedback is welcome since i have basically no professional experience with TS.
2023-05-02 14:49:38 +00:00
Bruno Ortiz
ecfe7c0488 last fixes after rebase 2023-05-02 11:24:08 -03:00
Bruno Ortiz
0aed507f16 fixing TS linting, removing import 2023-05-02 11:06:28 -03:00
Bruno Ortiz
bcb21311ea Accepting review suggestions 2023-05-02 11:06:25 -03:00
Bruno Ortiz
800b3b6323 adding doc and simplifying function 2023-05-02 11:03:32 -03:00
Bruno Ortiz
072f69e4c1 fixing ts linting and rust test 2023-05-02 11:01:53 -03:00
Bruno Ortiz
bd2160f014 final rabasing fixes 2023-05-02 11:01:53 -03:00
Bruno Ortiz
66fe84d936 accepting review suggestions 2023-05-02 11:01:41 -03:00
Bruno Ortiz
c372fb3495 fixing tests for windows 2023-05-02 10:59:31 -03:00
Bruno Ortiz
fe7874af90 reveal only when tree is visible 2023-05-02 10:59:31 -03:00
Bruno Ortiz
a3081a6774 Adding crate_root_path to crate_graph 2023-05-02 10:59:31 -03:00
Bruno Ortiz
8e687f7afb improving code to work with multi-workspaces 2023-05-02 10:59:31 -03:00
Bruno Ortiz
1b8288ff96 Fixing naming from graph to list 2023-05-02 10:59:29 -03:00
Bruno Ortiz
e2535926e9 Fixing tests 2023-05-02 10:56:50 -03:00
Bruno Ortiz
061940dad9 running prettier 2023-05-02 10:56:47 -03:00
Bruno Ortiz
440889edec fixing main_loop.rs 2023-05-02 10:56:13 -03:00
Bruno Ortiz
fc57339fdf removing unused code 2023-05-02 10:56:13 -03:00
Lukas Wirth
299382dacd WIP: Add lsp-ext scaffold 2023-05-02 10:56:13 -03:00
Lukas Wirth
9533644ccf Remove unnecessary openFile command 2023-05-02 10:56:13 -03:00
Lukas Wirth
af999f152b Reformat VSCode client code 2023-05-02 10:56:13 -03:00
bruno-ortiz
d1721b11e9 removing unused function 2023-05-02 10:56:13 -03:00
bruno-ortiz
ee54c6558d fixing linting problemas 2023-05-02 10:56:13 -03:00
bruno-ortiz
f8215dd426 fixing stblib loading 2023-05-02 10:56:13 -03:00
bruno-ortiz
d01fc6405b Creating rust dependencies tree view 2023-05-02 10:56:13 -03:00