Skip to content

Commit ef9e665

Browse files
committed
Add nested modules doc and fix typo
1 parent 83069ba commit ef9e665

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

crates/rust-analyzer/src/config.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,8 @@ config_data! {
662662
/// For traits the type "methods" can be used to only exclude the methods but not the trait
663663
/// itself.
664664
///
665-
/// For modules the type "subItems" can be used to only exclude the sub items but not the module
666-
/// itself.
665+
/// For modules the type "subItems" can be used to only exclude the all items in it but not the module
666+
/// itself. This does not include items defined in nested modules.
667667
///
668668
/// This setting also inherits `#rust-analyzer.completion.excludeTraits#`.
669669
completion_autoimport_exclude: Vec<AutoImportExclusion> = vec![
@@ -4138,8 +4138,8 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
41384138
"enum": ["always", "methods", "subItems"],
41394139
"enumDescriptions": [
41404140
"Do not show this item or its methods (if it is a trait) in auto-import completions.",
4141-
"Do not show this traits methods in auto-import completions.",
4142-
"Do not show this modules sub items in auto-import completions."
4141+
"Do not show this trait's methods in auto-import completions.",
4142+
"Do not show this module's all items in it in auto-import completions."
41434143
],
41444144
},
41454145
}

docs/book/src/configuration_generated.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,8 @@ verbose form `{ "path": "path::to::item", type: "always" }`.
446446
For traits the type "methods" can be used to only exclude the methods but not the trait
447447
itself.
448448

449-
For modules the type "subItems" can be used to only exclude the sub items but not the module
450-
itself.
449+
For modules the type "subItems" can be used to only exclude the all items in it but not the module
450+
itself. This does not include items defined in nested modules.
451451

452452
This setting also inherits `#rust-analyzer.completion.excludeTraits#`.
453453

editors/code/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,7 @@
13281328
"title": "Completion",
13291329
"properties": {
13301330
"rust-analyzer.completion.autoimport.exclude": {
1331-
"markdownDescription": "A list of full paths to items to exclude from auto-importing completions.\n\nTraits in this list won't have their methods suggested in completions unless the trait\nis in scope.\n\nYou can either specify a string path which defaults to type \"always\" or use the more\nverbose form `{ \"path\": \"path::to::item\", type: \"always\" }`.\n\nFor traits the type \"methods\" can be used to only exclude the methods but not the trait\nitself.\n\nFor modules the type \"subItems\" can be used to only exclude the sub items but not the module\nitself.\n\nThis setting also inherits `#rust-analyzer.completion.excludeTraits#`.",
1331+
"markdownDescription": "A list of full paths to items to exclude from auto-importing completions.\n\nTraits in this list won't have their methods suggested in completions unless the trait\nis in scope.\n\nYou can either specify a string path which defaults to type \"always\" or use the more\nverbose form `{ \"path\": \"path::to::item\", type: \"always\" }`.\n\nFor traits the type \"methods\" can be used to only exclude the methods but not the trait\nitself.\n\nFor modules the type \"subItems\" can be used to only exclude the all items in it but not the module\nitself. This does not include items defined in nested modules.\n\nThis setting also inherits `#rust-analyzer.completion.excludeTraits#`.",
13321332
"default": [
13331333
{
13341334
"path": "core::borrow::Borrow",
@@ -1360,8 +1360,8 @@
13601360
],
13611361
"enumDescriptions": [
13621362
"Do not show this item or its methods (if it is a trait) in auto-import completions.",
1363-
"Do not show this traits methods in auto-import completions.",
1364-
"Do not show this modules sub items in auto-import completions."
1363+
"Do not show this trait's methods in auto-import completions.",
1364+
"Do not show this module's all items in it in auto-import completions."
13651365
]
13661366
}
13671367
}

0 commit comments

Comments
 (0)