| Age | Commit message (Collapse) | Author | Lines |
|
feat: Allow declaring cfg groups in rust-project.json, to help sharing common cfgs
Closes #17815.
|
|
|
|
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.
|
|
|
|
|
|
docs: add msvc note to manual
Added note for Windows users to have the latest MSVC to minimize setup issues.
Closes #4870
|
|
|
|
|
|
The user does not specify `{arg}` in their JSON, and be pedantic about
commas in JSON sample.
|
|
feat: Use spans for builtin and declarative macro expansion errors
This should generally improve some error reporting for macro expansion errors. Especially for `compile_error!` within proc-macros
|
|
Seems this was switched over in https://github.com/rust-lang/rust-analyzer/issues/7922
|
|
|
|
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
|
|
|
|
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>
|
|
|
|
Fix incorrect generic parameter hint defaults
Missed this in the review but we should show const param hints, not lifetime param hints by default
|
|
|
|
|
|
|
|
fixes #11091
By default, only hints for const generic parameters are shown.
|
|
Add an option to use "::" for the external crate prefix.
Fixes #11823 .
Hi I'm very new to rust-analyzer and not sure how the review process are. Can somebody take a look at this PR? thanks!
|
|
|
|
|
|
|
|
|
|
|
|
internal: Cut compiletimes slightly
|
|
|
|
|
|
|
|
feat: add `toggleLSPLogs` command
Implement client-side command to toggle LSP logs in VSCode.
The command replaces the need to add/remove the `"rust-analyzer.trace.server": "verbose"` setting each time one wants to display logs. I've also updated the docs/ instances that reference the now outdated manual method.
The command labeled `rust-analyzer: Toggle LSP Logs` enables the setting project-wide and opens the relevant trace output channel.
Closes #8233
|
|
add `toggleLSPLogs` command
update docs to reflect new command
|
|
To generate all the requisite files, you need to run `cargo xtask codegen` not
`cargo test -p xtask`.
|
|
Allow rust-project.json to include arbitrary shell commands for runnables
This is a follow-up on #16135, resolving the feedback raised :)
Allow rust-project.json to include shell runnables, of the form:
```
{
"build_info": {
"label": "//project/foo:my-crate",
"target_kind": "bin",
"shell_runnables": [
{
"kind": "run",
"program": "buck2",
"args": ["run", "//project/foo:my-crate"]
},
{
"kind": "test_one",
"program": "test_runner",
"args": ["--name=$$TEST_NAME$$"]
}
]
}
}
```
If these runnable configs are present for the current crate in rust-project.json, offer them as runnables in VS Code.
This PR required some boring changes to APIs that previously only handled cargo situations. I've split out these changes as commits labelled 'refactor', so it's easy to see the interesting changes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
manual: remove suggestion of rust-project.json example
The manual has been linking to the repo
https://github.com/rust-analyzer/rust-project.json-example/tree/master
This repo does not contain a rust-project.json, does not appear to have _ever_ contained a rust-project.json, and my bug report about this has gone untouched: https://github.com/rust-analyzer/rust-project.json-example/issues/4
Since I can't figure out an example, this commit removes the link pending better documentation.
|
|
|
|
The manual has been linking to the repo
https://github.com/rust-analyzer/rust-project.json-example/tree/master
This repo does not contain a rust-project.json, does not appear to have _ever_ contained a rust-project.json, and my bug report about this has gone untouched: https://github.com/rust-analyzer/rust-project.json-example/issues/4
Since I can't figure out an example, this commit removes the link pending better documentation.
|
|
|
|
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.
|
|
internal: Use josh for subtree syncs
|
|
|