Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
4a7ec72
Make niches into nices
ThouCheese Jan 18, 2025
8b25ab0
Fix missing upmapping in trait impls completion
ChayimFriedman2 Jan 19, 2025
48d17b4
Move dual blanket impl logic from source analyzer to goto_def
Veykril Jan 20, 2025
4bc683d
Bring back goto def redirect for parse -> FromStr
Veykril Jan 20, 2025
ea3897b
Merge pull request #18984 from Veykril/push-nszlmxoxyxss
Veykril Jan 20, 2025
e9b410d
Goto `Display::fmt` when invoked on `to_string`
Veykril Jan 20, 2025
1d5af89
fix: Only refresh syntax tree view when the active document changes
Giga-Bowser Jan 20, 2025
f98e971
Fix another bug with completion of trait items inside macros
ChayimFriedman2 Jan 20, 2025
6291e1d
Merge pull request #18989 from Giga-Bowser/syntax-tree-refresh
Veykril Jan 21, 2025
0870bfb
Merge pull request #18977 from ChayimFriedman2/fix-upmapping
Veykril Jan 21, 2025
54d1d31
Cleanup `Name` string rendering
Veykril Jan 21, 2025
4b716bb
Merge pull request #18990 from Veykril/push-tqonnqxyrnsv
Veykril Jan 21, 2025
4308352
Merge pull request #18986 from Veykril/push-zlwvwlowpzqm
Veykril Jan 21, 2025
398cd2d
make large niche description more terse, switch to using u128::is_pow…
ThouCheese Jan 21, 2025
feb3fb5
Sort completion items that skip `await` and `iter()` behind those th…
ChayimFriedman2 Jan 20, 2025
a238ab8
Merge pull request #18988 from ChayimFriedman2/iter-relevance
ChayimFriedman2 Jan 21, 2025
f0f7204
Fix Param::as_local treating closures wrong
Veykril Jan 21, 2025
e08f6d4
switch from using leading zeros to trailing zeros
ThouCheese Jan 21, 2025
d8553c9
remove is_pwr2
ThouCheese Jan 21, 2025
284e0cd
Make `InlayHint::linked_location` computation lazy
Veykril Jan 21, 2025
802d9d5
Keep already computed inlay hint properties instead of late resolving…
Veykril Jan 21, 2025
5059c1a
Provide a config to control auto-insertion of `await` and `iter()`
ChayimFriedman2 Jan 21, 2025
c5ccf86
internal: Treat cfg fetching failures as a warning
Wilfred Jan 21, 2025
98582b2
manual: Document all rust-project.json fields
Wilfred Jan 8, 2025
fa272ed
Merge pull request #18878 from Wilfred/document_build_info
lnicola Jan 22, 2025
2eef052
increase `AUTODEREF_RECURSION_LIMIT` to 20
teoxoy Jan 22, 2025
3ca1066
Merge pull request #19004 from teoxoy/patch-1
ChayimFriedman2 Jan 22, 2025
a32f64d
Rephrase comment
lnicola Jan 23, 2025
7ba18da
Merge pull request #19009 from lnicola/dont-just-die
lnicola Jan 23, 2025
27084a2
Check cfg when collecting macro defs
darichey Jan 23, 2025
99b0ab5
Fix `ItemScope` not recording glob imports
Veykril Jan 24, 2025
a365f73
Merge pull request #19014 from darichey/fix-cfg-macro
Veykril Jan 24, 2025
dfd9490
fix: Fix flycheck panicking with "once" invocation strategy
Veykril Jan 24, 2025
2a9e6fb
Merge pull request #19016 from Veykril/push-moqnsytyrupu
Veykril Jan 24, 2025
5d9df43
Merge pull request #18994 from Wilfred/failed_rustc_cfg_as_warning
Veykril Jan 24, 2025
c3e88ae
Merge pull request #18993 from ChayimFriedman2/iter-config
Veykril Jan 24, 2025
b7997e0
Merge pull request #19017 from Veykril/push-uktrsknwmsvy
Veykril Jan 24, 2025
024da87
feat: Implement `arbitrary-self-types`
ShoyuVanilla Jan 23, 2025
3e6a933
Merge pull request #19012 from ShoyuVanilla/arbitrary-self
Veykril Jan 24, 2025
1dc34ee
Add a new failing test that overflows stack
ShoyuVanilla Jan 24, 2025
1e5f47b
Record the use tree index in glob imports
Veykril Jan 24, 2025
b44570f
Lazily compute location links in type hints again
Veykril Jan 24, 2025
51b323f
Merge pull request #18991 from Veykril/push-rmqmnrymwmoz
Veykril Jan 24, 2025
8063b1e
Merge pull request #19018 from Veykril/push-wxqqunxwrply
Veykril Jan 24, 2025
0a14e17
Explicitly add buildfiles when constructing ProjectFolders
darichey Jan 24, 2025
fff24d5
minor: Suggest better names when a type is a sequence
Wilfred Jan 24, 2025
165d78a
Merge pull request #19019 from darichey/add-buildfiles
Veykril Jan 25, 2025
7a7eb69
Merge pull request #19023 from Wilfred/sequence_type_names
Veykril Jan 25, 2025
37fc7ee
Merge pull request #18973 from ThouCheese/feat/nice-niches
Veykril Jan 25, 2025
592ecee
Only collect implicit visibile use symbols if they have renames
Veykril Jan 25, 2025
f45b8ad
Merge pull request #19026 from Veykril/push-wrxrutptywzx
Veykril Jan 25, 2025
0db8d05
Fix flyimport not filtering via stability of import path
Veykril Jan 25, 2025
58401ab
Merge pull request #19028 from Veykril/push-vuytpkvqzwzs
Veykril Jan 25, 2025
5d94c97
Skip redundant path search in `resolve_completion_edits`
Veykril Jan 25, 2025
a91b571
Merge pull request #19029 from Veykril/push-wklzwzqvkrou
Veykril Jan 25, 2025
105ea3b
Use `strict_provenance`
Veykril Jan 10, 2025
80615d9
Merge pull request #18909 from Veykril/push-rrpprwwzttkt
Veykril Jan 25, 2025
a5cd6c0
fix: Fix markdown horizontal ruler sometimes being treated as a heading
Veykril Jan 25, 2025
c1db5da
Merge pull request #19030 from Veykril/push-wuzvopyooznm
Veykril Jan 25, 2025
9691d22
fix: Prevent infinite recursion of bounds formatting
ShoyuVanilla Jan 24, 2025
2d94c69
Merge pull request #19020 from ShoyuVanilla/issues-19007
Veykril Jan 25, 2025
9ae0e7b
Don't complete doc(hidden) enum variants and use trees
ChayimFriedman2 Jan 25, 2025
3149e0f
Make proc_macro span's line & column 1-indexed, as documented
ChayimFriedman2 Jan 25, 2025
bbf9ff6
Merge pull request #19033 from ChayimFriedman2/span-1
ChayimFriedman2 Jan 26, 2025
176852b
Merge pull request #19034 from ChayimFriedman2/complete-hidden-variant
Veykril Jan 26, 2025
9ad5915
Update outdated permissions section in the README.md
Veykril Jan 26, 2025
a7cbe4b
Merge pull request #19035 from rust-lang/Veykril-patch-1
Veykril Jan 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
manual: Document all rust-project.json fields
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.
  • Loading branch information
Wilfred committed Jan 21, 2025
commit 98582b23ab4812ac57c5b989055f87e25c751ce9
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ use crate::{ManifestPath, TargetKind};
pub struct ProjectJson {
/// e.g. `path/to/sysroot`
pub(crate) sysroot: Option<AbsPathBuf>,
/// e.g. `path/to/sysroot/lib/rustlib/src/rust`
/// e.g. `path/to/sysroot/lib/rustlib/src/rust/library`
pub(crate) sysroot_src: Option<AbsPathBuf>,
project_root: AbsPathBuf,
/// The path to the rust-project.json file. May be None if this
Expand Down
90 changes: 83 additions & 7 deletions src/tools/rust-analyzer/docs/user/manual.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,32 @@ interface JsonProject {
/// dependencies as well as sysroot crate (libstd,
/// libcore and such).
crates: Crate[];
/// Configuration for CLI commands.
///
/// These are used for running and debugging binaries
/// and tests without encoding build system-specific
/// knowledge into rust-analyzer.
///
/// # Example
///
/// Below is an example of a test runnable. `{label}` and `{test_id}`
/// are explained in `Runnable::args`'s documentation below.
///
/// ```json
/// {
/// "program": "buck",
/// "args": [
/// "test",
/// "{label}",
/// "--",
/// "{test_id}",
/// "--print-passing-details"
/// ],
/// "cwd": "/home/user/repo-root/",
/// "kind": "testOne"
/// }
/// ```
runnables?: Runnable[];
}

interface Crate {
Expand All @@ -726,7 +752,10 @@ interface Crate {
/// Path to the root module of the crate.
root_module: string;
/// Edition of the crate.
edition: "2015" | "2018" | "2021";
edition: '2015' | '2018' | '2021' | '2024';
/// The version of the crate. Used for calculating
/// the correct docs.rs URL.
version?: string;
/// Dependencies
deps: Dep[];
/// Should this crate be treated as a member of
Expand Down Expand Up @@ -757,9 +786,9 @@ interface Crate {
/// rust-analyzer assumes that files from one
/// source can't refer to files in another source.
source?: {
include_dirs: string[],
exclude_dirs: string[],
},
include_dirs: string[];
exclude_dirs: string[];
};
/// List of cfg groups this crate inherits.
///
/// All cfg in these groups will be concatenated to
Expand All @@ -776,21 +805,68 @@ interface Crate {
target?: string;
/// Environment variables, used for
/// the `env!` macro
env: { [key: string]: string; },
env: { [key: string]: string; };

/// Whether the crate is a proc-macro crate.
is_proc_macro: boolean;
/// For proc-macro crates, path to compiled
/// proc-macro (.so file).
proc_macro_dylib_path?: string;

/// Repository, matching the URL that would be used
/// in Cargo.toml.
repository?: string;

/// Build-specific data about this crate.
build?: BuildInfo;
}

interface Dep {
/// Index of a crate in the `crates` array.
crate: number,
crate: number;
/// Name as should appear in the (implicit)
/// `extern crate name` declaration.
name: string,
name: string;
}

interface BuildInfo {
/// The name associated with this crate.
///
/// This is determined by the build system that produced
/// the `rust-project.json` in question. For instance, if buck were used,
/// the label might be something like `//ide/rust/rust-analyzer:rust-analyzer`.
///
/// Do not attempt to parse the contents of this string; it is a build system-specific
/// identifier similar to `Crate::display_name`.
label: string;
/// Path corresponding to the build system-specific file defining the crate.
build_file: string;
/// The kind of target.
///
/// This information is used to determine what sort
/// of runnable codelens to provide, if any.
target_kind: 'bin' | 'lib' | 'test';
}

interface Runnable {
/// The program invoked by the runnable.
///
/// For example, this might be `cargo`, `buck`, or `bazel`.
program: string;
/// The arguments passed to `program`.
args: string[];
/// The current working directory of the runnable.
cwd: string;
/// Used to decide what code lens to offer.
///
/// `testOne`: This runnable will be used when the user clicks the 'Run Test'
/// CodeLens above a test.
///
/// The args for testOne can contain two template strings:
/// `{label}` and `{test_id}`. `{label}` will be replaced
/// with the `Build::label` and `{test_id}` will be replaced
/// with the test name.
kind: 'testOne' | string;
}
----

Expand Down