mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-01 20:31:59 +00:00
Revamp auto-import exclude config
This commit is contained in:
parent
c5bda0d3f7
commit
5303dc5d99
10 changed files with 169 additions and 55 deletions
|
|
@ -1142,15 +1142,44 @@
|
|||
{
|
||||
"title": "completion",
|
||||
"properties": {
|
||||
"rust-analyzer.completion.autoimport.excludeTraits": {
|
||||
"markdownDescription": "A list of full paths to traits to exclude from flyimport.\n\nTraits in this list won't have their methods suggested in completions unless the trait\nis in scope.\n\nThis setting also inherits `#rust-analyzer.completion.excludeTraits#`.",
|
||||
"rust-analyzer.completion.autoimport.exclude": {
|
||||
"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 verbose\nform `{ \"path\": \"path::to::item\", type: \"always\" }`.\n\nFor traits the type \"methods\" can be used to only exclude the methods but not the trait itself.\n\nThis setting also inherits `#rust-analyzer.completion.excludeTraits#`.",
|
||||
"default": [
|
||||
"core::borrow::Borrow",
|
||||
"core::borrow::BorrowMut"
|
||||
{
|
||||
"path": "core::borrow::Borrow",
|
||||
"type": "methods"
|
||||
},
|
||||
{
|
||||
"path": "core::borrow::BorrowMut",
|
||||
"type": "methods"
|
||||
}
|
||||
],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"always",
|
||||
"methods"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Do not show this item or its methods (if it is a trait) in auto-import completions.",
|
||||
"Do not show this traits methods in auto-import completions."
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1189,7 +1218,7 @@
|
|||
"title": "completion",
|
||||
"properties": {
|
||||
"rust-analyzer.completion.excludeTraits": {
|
||||
"markdownDescription": "A list of full paths to traits to exclude from completion.\n\nMethods from these traits won't be completed, even if the trait is in scope. However, they will still be suggested on expressions whose type is `dyn Trait`, `impl Trait` or `T where T: Trait`.\n\nNote that the trait themselves can still be completed.",
|
||||
"markdownDescription": "A list of full paths to traits whose methods to exclude from completion.\n\nMethods from these traits won't be completed, even if the trait is in scope. However, they will still be suggested on expressions whose type is `dyn Trait`, `impl Trait` or `T where T: Trait`.\n\nNote that the trait themselves can still be completed.",
|
||||
"default": [],
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue