You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: manual.adoc
+30-7Lines changed: 30 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -110,8 +110,8 @@ Here are some useful self-diagnostic commands:
110
110
* **Rust Analyzer: Show RA Version** shows the version of `rust-analyzer` binary
111
111
* **Rust Analyzer: Status** prints some statistics about the server, like the few latest LSP requests
112
112
* To enable server-side logging, run with `env RA_LOG=info` and see `Output > Rust Analyzer Language Server` in VS Code's panel.
113
-
* To log all LSP requests, add `"rust-analyzer.trace.server": "verbose"` to the settings and look for `Server Trace` in the panel.
114
-
* To enable client-side logging, add `"rust-analyzer.trace.extension": true` to the settings and open the `Console` tab of VS Code developer tools.
113
+
* To log all LSP requests, add `"rust-analyzer.trace.server": "verbose"` to the settings and look for `Rust Analyzer Language Server Trace` in the panel.
114
+
* To enable client-side logging, add `"rust-analyzer.trace.extension": true` to the settings and open `Output > Rust Analyzer Client` in the panel.
115
115
116
116
=== rust-analyzer Language Server Binary
117
117
@@ -273,9 +273,6 @@ However, if you use some other build system, you'll have to describe the structu
273
273
[source,TypeScript]
274
274
----
275
275
interface JsonProject {
276
-
/// The set of paths containing the crates for this project.
277
-
/// Any `Crate` must be nested inside some `root`.
278
-
roots: string[];
279
276
/// The set of crates comprising the current project.
280
277
/// Must include all transitive dependencies as well as sysroot crate (libstd, libcore and such).
281
278
crates: Crate[];
@@ -288,11 +285,37 @@ interface Crate {
288
285
edition: "2015" | "2018";
289
286
/// Dependencies
290
287
deps: Dep[];
288
+
/// Should this crate be treated as a member of current "workspace".
289
+
///
290
+
/// By default, inferred from the `root_module` (members are the crates which reside
291
+
/// inside the directory opened in the editor).
292
+
///
293
+
/// Set this to `false` for things like standard library and 3rd party crates to
294
+
/// enable performance optimizations (rust-analyzer assumes that non-member crates
295
+
/// don't change).
296
+
is_workspace_member?: boolean;
297
+
/// Optionally specify the (super)set of `.rs` files comprising this crate.
298
+
///
299
+
/// By default, rust-analyzer assumes that only files under `root_module.parent` can belong to a crate.
300
+
/// `include_dirs` are included recursively, unless a subdirectory is in `exclude_dirs`.
301
+
///
302
+
/// Different crates can share the same `source`.
303
+
///
304
+
/// If two crates share an `.rs` file in common, they *must* have the same `source`.
305
+
/// rust-analyzer assumes that files from one source can't refer to files in another source.
306
+
source?: {
307
+
include_dirs: string[],
308
+
exclude_dirs: string[],
309
+
},
291
310
/// The set of cfgs activated for a given crate, like `["unix", "feature=foo", "feature=bar"]`.
292
311
cfg: string[];
312
+
/// Target triple for this Crate.
313
+
///
314
+
/// Used when running `rustc --print cfg` to get target-specific cfgs.
315
+
target?: string;
316
+
/// Environment variables, used for the `env!` macro
317
+
env: : { [key: string]: string; },
293
318
294
-
/// value of the OUT_DIR env variable.
295
-
out_dir?: string;
296
319
/// For proc-macro crates, path to compiles proc-macro (.so file).
**Become a sponsor:** https://opencollective.com/rust-analyzer/[opencollective.com/rust-analyzer]
11
+
12
+
== New Features
13
+
14
+
* pr:5524[] allow opting out of experimental diagnostics like MismatchedArgCount.
15
+
* pr:5518[] use resolved paths in SSR rules. The main user-visible changes are:
16
+
** SSR now matches paths based on whether they resolve to the same thing instead of whether they're written the same.
17
+
*** So `foo()` won't match `foo()` if it's a different function `foo()`, but will match `bar::foo()` if it's the same `foo`.
18
+
** Paths in the replacement will now be rendered with appropriate qualification for their context.
19
+
*** For example `foo::Bar` will render as just `Bar` inside the module `foo`, but might render as `baz::foo::Bar` from elsewhere.
20
+
** This means that all paths in the search pattern and replacement template must be able to be resolved.
21
+
** It now also matters where you invoke SSR from, since paths are resolved relative to wherever that is.
22
+
** Search now uses find-uses on paths to locate places to try matching. This means that when a path is present in the pattern, search will generally be pretty fast.
23
+
** Function calls can now match method calls again, but this time only if they resolve to the same function.
0 commit comments