mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Disable the completion for no corresponding client resolve capabilities
This commit is contained in:
parent
9656ceb896
commit
3183ff3a7b
12 changed files with 89 additions and 165 deletions
|
@ -190,10 +190,7 @@ impl<'a> Render<'a> {
|
|||
local_name,
|
||||
)
|
||||
.kind(CompletionItemKind::UnresolvedReference)
|
||||
.add_import(
|
||||
import_to_add,
|
||||
self.ctx.completion.config.resolve_additional_edits_lazily(),
|
||||
)
|
||||
.add_import(import_to_add)
|
||||
.build();
|
||||
return Some(item);
|
||||
}
|
||||
|
@ -248,7 +245,7 @@ impl<'a> Render<'a> {
|
|||
|
||||
let item = item
|
||||
.kind(kind)
|
||||
.add_import(import_to_add, self.ctx.completion.config.resolve_additional_edits_lazily())
|
||||
.add_import(import_to_add)
|
||||
.set_documentation(docs)
|
||||
.set_ref_match(ref_match)
|
||||
.build();
|
||||
|
@ -449,28 +446,6 @@ fn main() { let _: m::Spam = S<|> }
|
|||
insert: "m",
|
||||
kind: Module,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "m::Spam",
|
||||
source_range: 75..76,
|
||||
text_edit: TextEdit {
|
||||
indels: [
|
||||
Indel {
|
||||
insert: "use m::Spam;",
|
||||
delete: 0..0,
|
||||
},
|
||||
Indel {
|
||||
insert: "\n\n",
|
||||
delete: 0..0,
|
||||
},
|
||||
Indel {
|
||||
insert: "Spam",
|
||||
delete: 75..76,
|
||||
},
|
||||
],
|
||||
},
|
||||
kind: Enum,
|
||||
lookup: "Spam",
|
||||
},
|
||||
CompletionItem {
|
||||
label: "m::Spam::Foo",
|
||||
source_range: 75..76,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue