| Age | Commit message (Collapse) | Author | Lines |
|
Split manual.adoc into markdown files, one for each chapter.
For the parts of the manual that are generated from source code doc
comments, update the comments to use markdown syntax and update the
code generators to write to `generated.md` files.
For the weekly release, stop copying the .adoc files to the
`rust-analyzer/rust-analyzer.github.io` at release time. Instead,
we'll sync the manual hourly from this repository.
See https://github.com/rust-analyzer/rust-analyzer.github.io/pull/226
for the sync. This PR should be merged first, and that PR needs to be
merged before the next weekly release.
This change is based on #15795, but rebased and updated. I've also
manually checked each page for markdown syntax issues and fixed any I
encountered.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Co-authored-by: Josh Rotenberg <joshrotenberg@gmail.com>
|
|
feat: Provide a config to control auto-insertion of `await` and `iter()`
|
|
Ensure that all the fields that rust-analyzer understands are in the
manual, they all have doc comments, and they use consistent
punctuation (`;` rather than mixing `,` and `;`).
Whilst we're here, fix the `sysroot_src` example and add 2024 as a
legal value for Rust edition.
|
|
|
|
|
|
|
|
|
|
Add config setting which allows adding additional include paths to the VFS.
|
|
|
|
|
|
|
|
|
|
feat: Allow excluding specific traits from completion
|
|
|
|
|
|
To be accurate, only their methods are excluded, the trait themselves are still available.
I also excluded a bunch of std traits by default. Some less opinionated, like `AsRef`, which should never be used directly except in generic scenarios (and won't be excluded there), some more opinionated, like the ops traits, which I know some users sometimes want to use directly. Either way it's configurable.
It should be pretty easy to extend support to excluding only specific methods, but I didn't do that currently.
Traits configured to be excluded are resolved in each completion request from scratch. If this proves too expensive, it is easy enough to cache them in the DB.
|
|
|
|
|
|
|
|
feat: Show substitution where hovering over generic things
|
|
|
|
There are few things to note in the implementation:
First, this is a best-effort implementation. Mainly, type aliases may not be shown (due to their eager nature it's harder) and partial pathes (aka. hovering over `Struct` in `Struct::method`) are not supported at all.
Second, we only need to show substitutions in expression and pattern position, because in type position all generic arguments always have to be written explicitly.
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Tarek <tareknaser360@gmail.com>
|
|
to None
Signed-off-by: Tarek <tareknaser360@gmail.com>
|
|
|
|
|
|
|
|
|
|
But provide a config to suppress that.
I didn't check whether we are in statement expression position, because this is hard in completion (due to the natural incompleteness of source code when completion is invoked), and anyway using function returning unit as an argument to something seems... dubious.
|
|
|
|
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.
|
|
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
|
|
|
|
|