Commit graph

26 commits

Author SHA1 Message Date
Victor Song
1bfb362d7f chore(config): remove invocationLocation in favor of invocationStrategy
These flags were added to help rust-analyzer integrate with repos
requiring non-Cargo invocations. The consensus is that having two
independent settings are no longer needed. This change removes
`invocationLocation` in favor of `invocationStrategy` and changes
the internal representation of `InvocationStrategy::Once` to hold
the workspace root.
2024-08-19 02:25:40 -05:00
Lukas Wirth
ef7d2c5d65 feat: Load sysroot library via cargo metadata 2024-08-05 12:18:19 +02:00
Wilfred Hughes
1df27d84a1 docs: Fix JSON example for rust-analyzer.workspace.discoverConfig
The user does not specify `{arg}` in their JSON, and be pedantic about
commas in JSON sample.
2024-07-31 16:10:42 -07:00
David Barsky
06fe4e6b6e internal: remove UnindexedProject notification
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
2024-07-23 13:34:04 -04:00
PaulDotSH
fdbd9bee57 Remove lens.forceCustomCommands config 2024-07-23 03:27:28 -04:00
bors
40730a4baf Auto merge of #17246 - davidbarsky:david/move-rust-project-generation-to-server, r=Veykril
feature: teach rust-analyzer to discover `linked_projects`

This PR's been a long-time coming, but like the title says, it introduces server-side project discovery and removes the extension hooks I previously introduced. I don't think this PR is ready to land, but here are the things I'm feeling squishy about:
- I don't think I like the idea of introducing the `cargo-metadata` command-but-for-everything-else in the `flycheck` module, but the progress reporting infrastructure was too convenient to pass up. Happy to move it elsewhere.

Here are the things I _know_ I need to change:
- For progress reporting, I'm extracting from a `serde_json::Value` that corresponds to `tracing_subsciber::fmt::Layer`'s JSON output. I'd like to make this a bit more structured/documented than the current nonsense I wrote.
- The progress reporting currently hardcodes "Buck"; it should be deriving that from the previously mentioned more-structured-output.
- This doesn't handle *reloading* when a corresponding buildfile is changed. It should be doing that.

<details>
<summary>Anyway, here's a video of rust-analyzer discovering a Buck target.</summary>

https://github.com/rust-lang/rust-analyzer/assets/2067774/be6cd9b9-2c9a-402d-847f-05f860a91df1
</details>
2024-07-18 16:15:31 +00:00
David Barsky
2e582ad848 feature: move linked_projects discovery to the rust-analyzer server 2024-07-18 12:01:27 -04:00
bors
d95ce94543 Auto merge of #17616 - Veykril:config-param-hints, r=Veykril
Fix incorrect generic parameter hint defaults

Missed this in the review but we should show const param hints, not lifetime param hints by default
2024-07-17 06:54:06 +00:00
Lukas Wirth
7ef5f46c83 Fix incorrect generic parameter hint defaults 2024-07-17 08:52:23 +02:00
Laurențiu Nicola
f0b8055164 Add --keep-going to rust-analyzer.cargo.buildScripts.overrideCommand docs 2024-07-17 08:42:39 +03:00
Liao Junxuan
4988a497fd
feat: add inlay hints for generic parameters
fixes #11091

By default, only hints for const generic parameters are shown.
2024-07-08 19:11:41 +08:00
Shohei Wada
f398be1639 squash. 2024-07-02 01:52:34 +09:00
bors
dffbad50c1 Auto merge of #17522 - Veykril:comptimes, r=Veykril
internal: Cut compiletimes slightly
2024-07-01 08:43:11 +00:00
Lukas Wirth
1653889bad Remove serde flag from indexmap dependency 2024-06-30 18:14:53 +02:00
Tavo Annus
8fd7ae9759 Make borrow checking configurable for term search 2024-06-29 12:24:08 +03:00
Tavo Annus
efecb90b7f Fix suggestions of unstable constants 2024-06-22 21:33:58 +03:00
Lukas Wirth
34d273b5be Simplify some config serialization stuff 2024-06-11 10:45:17 +02:00
Tavo Annus
8ef19e777a Make term search fuel configurable 2024-05-08 19:46:33 +03:00
Wilfred Hughes
76fd22e8c4 docs: Fix typo in VS Code setting description 2024-04-30 11:17:57 -07:00
bors
d00de38599 Auto merge of #17021 - roife:add-hover-limits-for-adts, r=Veykril
Support hovering limits for adts

Fix #17009

1. Currently, r-a supports limiting the number of struct fields displayed when hovering. This PR extends it to support enum variants and union fields. Since the display of these three (ADTs) is similar, this PR extends 'hover_show_structFields' to 'hover_show_adtFieldsOrVariants'.
2. This PR also resolved the problem that the layout of ADT was not restricted by display limitations when hovering on the Self type.
3. Additionally, this PR changes the default value of display limitations to `10` (instead of the original `null`), which helps users discover this feature.
2024-04-25 07:23:27 +00:00
Lukas Wirth
7c39263450 Allow rust files to be used linkedProjects 2024-04-21 16:26:55 +02:00
roife
0e9d845fc7 Add hovering limitations support for variants 2024-04-20 09:14:00 +08:00
roife
c1a4ba55d7 fix: add a separate setting for enum variants 2024-04-19 21:45:56 +08:00
roife
a1136121b8 fix: adjust the limitation for ADTs' fields to 5 2024-04-16 16:28:23 +08:00
roife
3994fcb245 Update tests and docs for hover_show_adtFieldsOrVariants 2024-04-16 16:27:56 +08:00
roife
3a4a69a510 Add config hover_show_adtFieldsOrVariants to handle hovering limitation for ADTs 2024-04-16 16:26:23 +08:00