mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +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
|
@ -1,7 +1,7 @@
|
|||
use crate::completion::{CompletionItem, Completions, CompletionKind, CompletionItemKind, CompletionContext, completion_item::Builder};
|
||||
|
||||
fn snippet(ctx: &CompletionContext, label: &str, snippet: &str) -> Builder {
|
||||
CompletionItem::new(CompletionKind::Snippet, ctx.leaf_range(), label)
|
||||
CompletionItem::new(CompletionKind::Snippet, ctx.source_range(), label)
|
||||
.snippet(snippet)
|
||||
.kind(CompletionItemKind::Snippet)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue