Skip to content

Commit c8d0a90

Browse files
bors[bot]gibfahn
andauthored
Merge #11849
11849: docs(auto_import): change by_self -> self and by_crate -> crate r=Veykril a=gibfahn --- #### Commits _(oldest to newest)_ 6b38c2d 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. <br/> Co-authored-by: Gibson Fahnestock <[email protected]>
2 parents 63c4d6b + 6b38c2d commit c8d0a90

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/ide_assists/src/handlers/auto_import.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ use crate::{AssistContext, AssistId, AssistKind, Assists, GroupLabel};
5454
// The style of imports in the same crate is configurable through the `importPrefix` setting.
5555
// It has the following configurations:
5656
//
57-
// - `by_crate`: This setting will force paths to be always absolute, starting with the `crate`
57+
// - `crate`: This setting will force paths to be always absolute, starting with the `crate`
5858
// prefix, unless the item is defined outside of the current crate.
59-
// - `by_self`: This setting will force paths that are relative to the current module to always
59+
// - `self`: This setting will force paths that are relative to the current module to always
6060
// start with `self`. This will result in paths that always start with either `crate`, `self`,
6161
// `super` or an extern crate identifier.
6262
// - `plain`: This setting does not impose any restrictions in imports.

docs/user/manual.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ nvim_lsp.rust_analyzer.setup({
310310
["rust-analyzer"] = {
311311
assist = {
312312
importGranularity = "module",
313-
importPrefix = "by_self",
313+
importPrefix = "self",
314314
},
315315
cargo = {
316316
loadOutDirsFromCheck = true

0 commit comments

Comments
 (0)