Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit eaebead

Browse files
Fix config keys regarding imports in docs
1 parent 5342f47 commit eaebead

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

crates/ide-assists/src/handlers/auto_import.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists, GroupLabel};
4040
//
4141
// .Import Granularity
4242
//
43-
// It is possible to configure how use-trees are merged with the `importGranularity` setting.
43+
// It is possible to configure how use-trees are merged with the `imports.granularity.group` setting.
4444
// It has the following configurations:
4545
//
4646
// - `crate`: Merge imports from the same crate into a single use statement. This kind of
@@ -50,11 +50,11 @@ use crate::{AssistContext, AssistId, AssistKind, Assists, GroupLabel};
5050
// - `preserve`: Do not change the granularity of any imports. For auto-import this has the same
5151
// effect as `item`.
5252
//
53-
// In `VS Code` the configuration for this is `rust-analyzer.assist.importGranularity`.
53+
// In `VS Code` the configuration for this is `rust-analyzer.imports.granularity.group`.
5454
//
5555
// .Import Prefix
5656
//
57-
// The style of imports in the same crate is configurable through the `importPrefix` setting.
57+
// The style of imports in the same crate is configurable through the `imports.prefix` setting.
5858
// It has the following configurations:
5959
//
6060
// - `crate`: This setting will force paths to be always absolute, starting with the `crate`
@@ -64,7 +64,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists, GroupLabel};
6464
// `super` or an extern crate identifier.
6565
// - `plain`: This setting does not impose any restrictions in imports.
6666
//
67-
// In `VS Code` the configuration for this is `rust-analyzer.assist.importPrefix`.
67+
// In `VS Code` the configuration for this is `rust-analyzer.imports.prefix`.
6868
//
6969
// image::https://user-images.githubusercontent.com/48062697/113020673-b85be580-917a-11eb-9022-59585f35d4f8.gif[]
7070

crates/ide-completion/src/completions/flyimport.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ use super::Completions;
9595
//
9696
// .Import configuration
9797
//
98-
// It is possible to configure how use-trees are merged with the `importMergeBehavior` setting.
98+
// It is possible to configure how use-trees are merged with the `imports.granularity.group` setting.
9999
// Mimics the corresponding behavior of the `Auto Import` feature.
100100
//
101101
// .LSP and performance implications

docs/user/manual.adoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,11 @@ nvim_lsp.rust_analyzer.setup({
308308
on_attach=on_attach,
309309
settings = {
310310
["rust-analyzer"] = {
311-
assist = {
312-
importGranularity = "module",
313-
importPrefix = "self",
311+
imports = {
312+
granularity = {
313+
group = "module",
314+
},
315+
prefix = "self",
314316
},
315317
cargo = {
316318
loadOutDirsFromCheck = true

0 commit comments

Comments
 (0)