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.
This commit is contained in:
Gibson Fahnestock 2022-03-30 11:45:14 +01:00
parent 63c4d6b20d
commit 6b38c2d75e
No known key found for this signature in database
GPG key ID: B01FBB92821C587A
2 changed files with 3 additions and 3 deletions

View file

@ -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. // The style of imports in the same crate is configurable through the `importPrefix` setting.
// It has the following configurations: // 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. // 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`, // start with `self`. This will result in paths that always start with either `crate`, `self`,
// `super` or an extern crate identifier. // `super` or an extern crate identifier.
// - `plain`: This setting does not impose any restrictions in imports. // - `plain`: This setting does not impose any restrictions in imports.

View file

@ -310,7 +310,7 @@ nvim_lsp.rust_analyzer.setup({
["rust-analyzer"] = { ["rust-analyzer"] = {
assist = { assist = {
importGranularity = "module", importGranularity = "module",
importPrefix = "by_self", importPrefix = "self",
}, },
cargo = { cargo = {
loadOutDirsFromCheck = true loadOutDirsFromCheck = true