mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
use a combination of source_change
and text_edit
for CompleteItem
This commit is contained in:
parent
94d96b60f3
commit
2a43638052
48 changed files with 305 additions and 295 deletions
|
@ -17,7 +17,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
|
|||
for (name, res) in module_scope.entries() {
|
||||
CompletionItem::new(
|
||||
CompletionKind::Reference,
|
||||
ctx.leaf_range(),
|
||||
ctx.source_range(),
|
||||
name.to_string(),
|
||||
)
|
||||
.from_resolution(ctx, res)
|
||||
|
@ -30,7 +30,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
|
|||
.for_each(|(variant_name, _variant)| {
|
||||
CompletionItem::new(
|
||||
CompletionKind::Reference,
|
||||
ctx.leaf_range(),
|
||||
ctx.source_range(),
|
||||
variant_name.to_string(),
|
||||
)
|
||||
.kind(CompletionItemKind::EnumVariant)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue