11849: docs(auto_import): change by_self -> self and by_crate -> crate r=Veykril a=gibfahn



---

#### Commits _(oldest to newest)_

6b38c2d75 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 <gibfahn@gmail.com>
This commit is contained in:
bors[bot] 2022-03-30 11:52:50 +00:00 committed by GitHub
commit c8d0a90145
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -54,9 +54,9 @@
// 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.

View File

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