From 6b38c2d75e54f7886a34693067fd73d3862e9b84 Mon Sep 17 00:00:00 2001 From: Gibson Fahnestock Date: Wed, 30 Mar 2022 11:45:14 +0100 Subject: [PATCH] docs(auto_import): change by_self -> self and by_crate -> crate Keep things consistent with the package.json , which uses `self` and `crate` instead of `by_self` and `by_crate`. Both names are in fact allowed as aliases, but we should be consistent so that people reading the docs and using a schema do not see red squiggles. --- crates/ide_assists/src/handlers/auto_import.rs | 4 ++-- docs/user/manual.adoc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ide_assists/src/handlers/auto_import.rs b/crates/ide_assists/src/handlers/auto_import.rs index 5a2809a1cf..874563c6f7 100644 --- a/crates/ide_assists/src/handlers/auto_import.rs +++ b/crates/ide_assists/src/handlers/auto_import.rs @@ -54,9 +54,9 @@ use crate::{AssistContext, AssistId, AssistKind, Assists, GroupLabel}; // The style of imports in the same crate is configurable through the `importPrefix` setting. // It has the following configurations: // -// - `by_crate`: This setting will force paths to be always absolute, starting with the `crate` +// - `crate`: This setting will force paths to be always absolute, starting with the `crate` // prefix, unless the item is defined outside of the current crate. -// - `by_self`: This setting will force paths that are relative to the current module to always +// - `self`: This setting will force paths that are relative to the current module to always // start with `self`. This will result in paths that always start with either `crate`, `self`, // `super` or an extern crate identifier. // - `plain`: This setting does not impose any restrictions in imports. diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc index ba28f68029..27d5d96159 100644 --- a/docs/user/manual.adoc +++ b/docs/user/manual.adoc @@ -310,7 +310,7 @@ nvim_lsp.rust_analyzer.setup({ ["rust-analyzer"] = { assist = { importGranularity = "module", - importPrefix = "by_self", + importPrefix = "self", }, cargo = { loadOutDirsFromCheck = true