mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
refactor to use remove_range
and replace_range
instead of TextEdit
This commit is contained in:
parent
64342599ca
commit
94d96b60f3
47 changed files with 619 additions and 755 deletions
|
@ -1,7 +1,7 @@
|
|||
use crate::completion::{CompletionItem, Completions, CompletionKind, CompletionItemKind, CompletionContext, completion_item::Builder};
|
||||
|
||||
fn snippet<'a>(ctx: &'a CompletionContext<'a>, label: &str, snippet: &str) -> Builder<'a> {
|
||||
CompletionItem::new(CompletionKind::Snippet, ctx, label)
|
||||
fn snippet(ctx: &CompletionContext, label: &str, snippet: &str) -> Builder {
|
||||
CompletionItem::new(CompletionKind::Snippet, ctx.leaf_range(), label)
|
||||
.snippet(snippet)
|
||||
.kind(CompletionItemKind::Snippet)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue