mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +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
|
@ -31,7 +31,7 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty)
|
||||||
for field in s.fields(ctx.db) {
|
for field in s.fields(ctx.db) {
|
||||||
CompletionItem::new(
|
CompletionItem::new(
|
||||||
CompletionKind::Reference,
|
CompletionKind::Reference,
|
||||||
ctx,
|
ctx.leaf_range(),
|
||||||
field.name().to_string(),
|
field.name().to_string(),
|
||||||
)
|
)
|
||||||
.kind(CompletionItemKind::Field)
|
.kind(CompletionItemKind::Field)
|
||||||
|
@ -45,7 +45,7 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty)
|
||||||
}
|
}
|
||||||
Ty::Tuple(fields) => {
|
Ty::Tuple(fields) => {
|
||||||
for (i, _ty) in fields.iter().enumerate() {
|
for (i, _ty) in fields.iter().enumerate() {
|
||||||
CompletionItem::new(CompletionKind::Reference, ctx, i.to_string())
|
CompletionItem::new(CompletionKind::Reference, ctx.leaf_range(), i.to_string())
|
||||||
.kind(CompletionItemKind::Field)
|
.kind(CompletionItemKind::Field)
|
||||||
.add_to(acc);
|
.add_to(acc);
|
||||||
}
|
}
|
||||||
|
@ -59,10 +59,14 @@ fn complete_methods(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty
|
||||||
receiver.iterate_methods(ctx.db, |func| {
|
receiver.iterate_methods(ctx.db, |func| {
|
||||||
let sig = func.signature(ctx.db);
|
let sig = func.signature(ctx.db);
|
||||||
if sig.has_self_param() {
|
if sig.has_self_param() {
|
||||||
CompletionItem::new(CompletionKind::Reference, ctx, sig.name().to_string())
|
CompletionItem::new(
|
||||||
.from_function(ctx, func)
|
CompletionKind::Reference,
|
||||||
.kind(CompletionItemKind::Method)
|
ctx.leaf_range(),
|
||||||
.add_to(acc);
|
sig.name().to_string(),
|
||||||
|
)
|
||||||
|
.from_function(ctx, func)
|
||||||
|
.kind(CompletionItemKind::Method)
|
||||||
|
.add_to(acc);
|
||||||
}
|
}
|
||||||
None::<()>
|
None::<()>
|
||||||
});
|
});
|
||||||
|
|
|
@ -34,7 +34,7 @@ pub(super) fn complete_fn_param(acc: &mut Completions, ctx: &CompletionContext)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.for_each(|(label, lookup)| {
|
.for_each(|(label, lookup)| {
|
||||||
CompletionItem::new(CompletionKind::Magic, ctx, label)
|
CompletionItem::new(CompletionKind::Magic, ctx.leaf_range(), label)
|
||||||
.lookup_by(lookup)
|
.lookup_by(lookup)
|
||||||
.add_to(acc)
|
.add_to(acc)
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,25 +9,26 @@ use crate::completion::{CompletionContext, CompletionItem, Completions, Completi
|
||||||
|
|
||||||
pub(super) fn complete_use_tree_keyword(acc: &mut Completions, ctx: &CompletionContext) {
|
pub(super) fn complete_use_tree_keyword(acc: &mut Completions, ctx: &CompletionContext) {
|
||||||
// complete keyword "crate" in use stmt
|
// complete keyword "crate" in use stmt
|
||||||
|
let leaf_range = ctx.leaf_range();
|
||||||
match (ctx.use_item_syntax.as_ref(), ctx.path_prefix.as_ref()) {
|
match (ctx.use_item_syntax.as_ref(), ctx.path_prefix.as_ref()) {
|
||||||
(Some(_), None) => {
|
(Some(_), None) => {
|
||||||
CompletionItem::new(CompletionKind::Keyword, ctx, "crate")
|
CompletionItem::new(CompletionKind::Keyword, leaf_range, "crate")
|
||||||
.kind(CompletionItemKind::Keyword)
|
.kind(CompletionItemKind::Keyword)
|
||||||
.insert_text("crate::")
|
.insert_text("crate::")
|
||||||
.add_to(acc);
|
.add_to(acc);
|
||||||
CompletionItem::new(CompletionKind::Keyword, ctx, "self")
|
CompletionItem::new(CompletionKind::Keyword, leaf_range, "self")
|
||||||
.kind(CompletionItemKind::Keyword)
|
.kind(CompletionItemKind::Keyword)
|
||||||
.add_to(acc);
|
.add_to(acc);
|
||||||
CompletionItem::new(CompletionKind::Keyword, ctx, "super")
|
CompletionItem::new(CompletionKind::Keyword, leaf_range, "super")
|
||||||
.kind(CompletionItemKind::Keyword)
|
.kind(CompletionItemKind::Keyword)
|
||||||
.insert_text("super::")
|
.insert_text("super::")
|
||||||
.add_to(acc);
|
.add_to(acc);
|
||||||
}
|
}
|
||||||
(Some(_), Some(_)) => {
|
(Some(_), Some(_)) => {
|
||||||
CompletionItem::new(CompletionKind::Keyword, ctx, "self")
|
CompletionItem::new(CompletionKind::Keyword, leaf_range, "self")
|
||||||
.kind(CompletionItemKind::Keyword)
|
.kind(CompletionItemKind::Keyword)
|
||||||
.add_to(acc);
|
.add_to(acc);
|
||||||
CompletionItem::new(CompletionKind::Keyword, ctx, "super")
|
CompletionItem::new(CompletionKind::Keyword, leaf_range, "super")
|
||||||
.kind(CompletionItemKind::Keyword)
|
.kind(CompletionItemKind::Keyword)
|
||||||
.insert_text("super::")
|
.insert_text("super::")
|
||||||
.add_to(acc);
|
.add_to(acc);
|
||||||
|
@ -37,7 +38,7 @@ pub(super) fn complete_use_tree_keyword(acc: &mut Completions, ctx: &CompletionC
|
||||||
}
|
}
|
||||||
|
|
||||||
fn keyword(ctx: &CompletionContext, kw: &str, snippet: &str) -> CompletionItem {
|
fn keyword(ctx: &CompletionContext, kw: &str, snippet: &str) -> CompletionItem {
|
||||||
CompletionItem::new(CompletionKind::Keyword, ctx, kw)
|
CompletionItem::new(CompletionKind::Keyword, ctx.leaf_range(), kw)
|
||||||
.kind(CompletionItemKind::Keyword)
|
.kind(CompletionItemKind::Keyword)
|
||||||
.snippet(snippet)
|
.snippet(snippet)
|
||||||
.build()
|
.build()
|
||||||
|
|
|
@ -15,18 +15,26 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
|
||||||
hir::Def::Module(module) => {
|
hir::Def::Module(module) => {
|
||||||
let module_scope = module.scope(ctx.db);
|
let module_scope = module.scope(ctx.db);
|
||||||
for (name, res) in module_scope.entries() {
|
for (name, res) in module_scope.entries() {
|
||||||
CompletionItem::new(CompletionKind::Reference, ctx, name.to_string())
|
CompletionItem::new(
|
||||||
.from_resolution(ctx, res)
|
CompletionKind::Reference,
|
||||||
.add_to(acc);
|
ctx.leaf_range(),
|
||||||
|
name.to_string(),
|
||||||
|
)
|
||||||
|
.from_resolution(ctx, res)
|
||||||
|
.add_to(acc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hir::Def::Enum(e) => {
|
hir::Def::Enum(e) => {
|
||||||
e.variants(ctx.db)
|
e.variants(ctx.db)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.for_each(|(variant_name, _variant)| {
|
.for_each(|(variant_name, _variant)| {
|
||||||
CompletionItem::new(CompletionKind::Reference, ctx, variant_name.to_string())
|
CompletionItem::new(
|
||||||
.kind(CompletionItemKind::EnumVariant)
|
CompletionKind::Reference,
|
||||||
.add_to(acc)
|
ctx.leaf_range(),
|
||||||
|
variant_name.to_string(),
|
||||||
|
)
|
||||||
|
.kind(CompletionItemKind::EnumVariant)
|
||||||
|
.add_to(acc)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
_ => return,
|
_ => return,
|
||||||
|
|
|
@ -29,9 +29,13 @@ pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.for_each(|(name, res)| {
|
.for_each(|(name, res)| {
|
||||||
CompletionItem::new(CompletionKind::Reference, ctx, name.to_string())
|
CompletionItem::new(
|
||||||
.from_resolution(ctx, res)
|
CompletionKind::Reference,
|
||||||
.add_to(acc)
|
ctx.leaf_range(),
|
||||||
|
name.to_string(),
|
||||||
|
)
|
||||||
|
.from_resolution(ctx, res)
|
||||||
|
.add_to(acc)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,9 +50,13 @@ fn complete_fn(
|
||||||
.flat_map(|scope| scopes.scopes.entries(scope).iter())
|
.flat_map(|scope| scopes.scopes.entries(scope).iter())
|
||||||
.filter(|entry| shadowed.insert(entry.name()))
|
.filter(|entry| shadowed.insert(entry.name()))
|
||||||
.for_each(|entry| {
|
.for_each(|entry| {
|
||||||
CompletionItem::new(CompletionKind::Reference, ctx, entry.name().to_string())
|
CompletionItem::new(
|
||||||
.kind(CompletionItemKind::Binding)
|
CompletionKind::Reference,
|
||||||
.add_to(acc)
|
ctx.leaf_range(),
|
||||||
|
entry.name().to_string(),
|
||||||
|
)
|
||||||
|
.kind(CompletionItemKind::Binding)
|
||||||
|
.add_to(acc)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::completion::{CompletionItem, Completions, CompletionKind, CompletionItemKind, CompletionContext, completion_item::Builder};
|
use crate::completion::{CompletionItem, Completions, CompletionKind, CompletionItemKind, CompletionContext, completion_item::Builder};
|
||||||
|
|
||||||
fn snippet<'a>(ctx: &'a CompletionContext<'a>, label: &str, snippet: &str) -> Builder<'a> {
|
fn snippet(ctx: &CompletionContext, label: &str, snippet: &str) -> Builder {
|
||||||
CompletionItem::new(CompletionKind::Snippet, ctx, label)
|
CompletionItem::new(CompletionKind::Snippet, ctx.leaf_range(), label)
|
||||||
.snippet(snippet)
|
.snippet(snippet)
|
||||||
.kind(CompletionItemKind::Snippet)
|
.kind(CompletionItemKind::Snippet)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
use hir::PerNs;
|
use hir::PerNs;
|
||||||
use ra_text_edit::{
|
|
||||||
AtomTextEdit,
|
|
||||||
TextEdit,
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::completion::completion_context::CompletionContext;
|
use crate::completion::completion_context::CompletionContext;
|
||||||
|
use ra_syntax::TextRange;
|
||||||
|
|
||||||
/// `CompletionItem` describes a single completion variant in the editor pop-up.
|
/// `CompletionItem` describes a single completion variant in the editor pop-up.
|
||||||
/// It is basically a POD with various properties. To construct a
|
/// It is basically a POD with various properties. To construct a
|
||||||
|
@ -18,26 +15,10 @@ pub struct CompletionItem {
|
||||||
kind: Option<CompletionItemKind>,
|
kind: Option<CompletionItemKind>,
|
||||||
detail: Option<String>,
|
detail: Option<String>,
|
||||||
lookup: Option<String>,
|
lookup: Option<String>,
|
||||||
/// The format of the insert text. The format applies to both the `insert_text` property
|
insert_text: Option<String>,
|
||||||
/// and the `insert` property of a provided `text_edit`.
|
|
||||||
insert_text_format: InsertTextFormat,
|
insert_text_format: InsertTextFormat,
|
||||||
/// An edit which is applied to a document when selecting this completion. When an edit is
|
replace_range: TextRange,
|
||||||
/// provided the value of `insert_text` is ignored.
|
delete_range: Option<TextRange>,
|
||||||
///
|
|
||||||
/// *Note:* The range of the edit must be a single line range and it must contain the position
|
|
||||||
/// at which completion has been requested.
|
|
||||||
///
|
|
||||||
/// *Note:* If sending a range that overlaps a string, the string should match the relevant
|
|
||||||
/// part of the replacement text, or be filtered out.
|
|
||||||
text_edit: Option<AtomTextEdit>,
|
|
||||||
/// An optional array of additional text edits that are applied when
|
|
||||||
/// selecting this completion. Edits must not overlap (including the same insert position)
|
|
||||||
/// with the main edit nor with themselves.
|
|
||||||
///
|
|
||||||
/// Additional text edits should be used to change text unrelated to the current cursor position
|
|
||||||
/// (for example adding an import statement at the top of the file if the completion item will
|
|
||||||
/// insert an unqualified type).
|
|
||||||
additional_text_edits: Option<TextEdit>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
|
@ -76,14 +57,14 @@ pub enum InsertTextFormat {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CompletionItem {
|
impl CompletionItem {
|
||||||
pub(crate) fn new<'a>(
|
pub(crate) fn new(
|
||||||
completion_kind: CompletionKind,
|
completion_kind: CompletionKind,
|
||||||
ctx: &'a CompletionContext,
|
replace_range: TextRange,
|
||||||
label: impl Into<String>,
|
label: impl Into<String>,
|
||||||
) -> Builder<'a> {
|
) -> Builder {
|
||||||
let label = label.into();
|
let label = label.into();
|
||||||
Builder {
|
Builder {
|
||||||
ctx,
|
replace_range,
|
||||||
completion_kind,
|
completion_kind,
|
||||||
label,
|
label,
|
||||||
insert_text: None,
|
insert_text: None,
|
||||||
|
@ -91,8 +72,7 @@ impl CompletionItem {
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
kind: None,
|
kind: None,
|
||||||
text_edit: None,
|
delete_range: None,
|
||||||
additional_text_edits: None,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// What user sees in pop-up in the UI.
|
/// What user sees in pop-up in the UI.
|
||||||
|
@ -114,22 +94,27 @@ impl CompletionItem {
|
||||||
pub fn insert_text_format(&self) -> InsertTextFormat {
|
pub fn insert_text_format(&self) -> InsertTextFormat {
|
||||||
self.insert_text_format.clone()
|
self.insert_text_format.clone()
|
||||||
}
|
}
|
||||||
|
pub fn insert_text(&self) -> String {
|
||||||
|
match &self.insert_text {
|
||||||
|
Some(t) => t.clone(),
|
||||||
|
None => self.label.clone(),
|
||||||
|
}
|
||||||
|
}
|
||||||
pub fn kind(&self) -> Option<CompletionItemKind> {
|
pub fn kind(&self) -> Option<CompletionItemKind> {
|
||||||
self.kind
|
self.kind
|
||||||
}
|
}
|
||||||
pub fn text_edit(&mut self) -> Option<&AtomTextEdit> {
|
pub fn delete_range(&self) -> Option<TextRange> {
|
||||||
self.text_edit.as_ref()
|
self.delete_range
|
||||||
}
|
}
|
||||||
pub fn take_additional_text_edits(&mut self) -> Option<TextEdit> {
|
pub fn replace_range(&self) -> TextRange {
|
||||||
self.additional_text_edits.take()
|
self.replace_range
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A helper to make `CompletionItem`s.
|
/// A helper to make `CompletionItem`s.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub(crate) struct Builder<'a> {
|
pub(crate) struct Builder {
|
||||||
ctx: &'a CompletionContext<'a>,
|
replace_range: TextRange,
|
||||||
completion_kind: CompletionKind,
|
completion_kind: CompletionKind,
|
||||||
label: String,
|
label: String,
|
||||||
insert_text: Option<String>,
|
insert_text: Option<String>,
|
||||||
|
@ -137,76 +122,53 @@ pub(crate) struct Builder<'a> {
|
||||||
detail: Option<String>,
|
detail: Option<String>,
|
||||||
lookup: Option<String>,
|
lookup: Option<String>,
|
||||||
kind: Option<CompletionItemKind>,
|
kind: Option<CompletionItemKind>,
|
||||||
text_edit: Option<AtomTextEdit>,
|
delete_range: Option<TextRange>,
|
||||||
additional_text_edits: Option<TextEdit>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Builder<'a> {
|
impl Builder {
|
||||||
pub(crate) fn add_to(self, acc: &mut Completions) {
|
pub(crate) fn add_to(self, acc: &mut Completions) {
|
||||||
acc.add(self.build())
|
acc.add(self.build())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn build(self) -> CompletionItem {
|
pub(crate) fn build(self) -> CompletionItem {
|
||||||
let self_text_edit = self.text_edit;
|
|
||||||
let self_insert_text = self.insert_text;
|
|
||||||
let text_edit = match (self_text_edit, self_insert_text) {
|
|
||||||
(Some(text_edit), ..) => Some(text_edit),
|
|
||||||
(None, Some(insert_text)) => {
|
|
||||||
Some(AtomTextEdit::replace(self.ctx.leaf_range(), insert_text))
|
|
||||||
}
|
|
||||||
_ => None,
|
|
||||||
};
|
|
||||||
|
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
|
replace_range: self.replace_range,
|
||||||
label: self.label,
|
label: self.label,
|
||||||
detail: self.detail,
|
detail: self.detail,
|
||||||
insert_text_format: self.insert_text_format,
|
insert_text_format: self.insert_text_format,
|
||||||
lookup: self.lookup,
|
lookup: self.lookup,
|
||||||
kind: self.kind,
|
kind: self.kind,
|
||||||
completion_kind: self.completion_kind,
|
completion_kind: self.completion_kind,
|
||||||
text_edit,
|
delete_range: self.delete_range,
|
||||||
additional_text_edits: self.additional_text_edits,
|
insert_text: self.insert_text,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub(crate) fn lookup_by(mut self, lookup: impl Into<String>) -> Builder<'a> {
|
pub(crate) fn lookup_by(mut self, lookup: impl Into<String>) -> Builder {
|
||||||
self.lookup = Some(lookup.into());
|
self.lookup = Some(lookup.into());
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub(crate) fn insert_text(mut self, insert_text: impl Into<String>) -> Builder<'a> {
|
pub(crate) fn insert_text(mut self, insert_text: impl Into<String>) -> Builder {
|
||||||
self.insert_text = Some(insert_text.into());
|
self.insert_text = Some(insert_text.into());
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
pub(crate) fn insert_text_format(
|
pub(crate) fn insert_text_format(mut self, insert_text_format: InsertTextFormat) -> Builder {
|
||||||
mut self,
|
|
||||||
insert_text_format: InsertTextFormat,
|
|
||||||
) -> Builder<'a> {
|
|
||||||
self.insert_text_format = insert_text_format;
|
self.insert_text_format = insert_text_format;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub(crate) fn snippet(mut self, snippet: impl Into<String>) -> Builder<'a> {
|
pub(crate) fn snippet(mut self, snippet: impl Into<String>) -> Builder {
|
||||||
self.insert_text_format = InsertTextFormat::Snippet;
|
self.insert_text_format = InsertTextFormat::Snippet;
|
||||||
self.insert_text(snippet)
|
self.insert_text(snippet)
|
||||||
}
|
}
|
||||||
pub(crate) fn kind(mut self, kind: CompletionItemKind) -> Builder<'a> {
|
pub(crate) fn kind(mut self, kind: CompletionItemKind) -> Builder {
|
||||||
self.kind = Some(kind);
|
self.kind = Some(kind);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
pub(crate) fn text_edit(mut self, text_edit: AtomTextEdit) -> Builder<'a> {
|
pub(crate) fn detail(self, detail: impl Into<String>) -> Builder {
|
||||||
self.text_edit = Some(text_edit);
|
|
||||||
self
|
|
||||||
}
|
|
||||||
#[allow(unused)]
|
|
||||||
pub(crate) fn additional_text_edits(mut self, additional_text_edits: TextEdit) -> Builder<'a> {
|
|
||||||
self.additional_text_edits = Some(additional_text_edits);
|
|
||||||
self
|
|
||||||
}
|
|
||||||
#[allow(unused)]
|
|
||||||
pub(crate) fn detail(self, detail: impl Into<String>) -> Builder<'a> {
|
|
||||||
self.set_detail(Some(detail))
|
self.set_detail(Some(detail))
|
||||||
}
|
}
|
||||||
pub(crate) fn set_detail(mut self, detail: Option<impl Into<String>>) -> Builder<'a> {
|
pub(crate) fn set_detail(mut self, detail: Option<impl Into<String>>) -> Builder {
|
||||||
self.detail = detail.map(Into::into);
|
self.detail = detail.map(Into::into);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
@ -214,7 +176,7 @@ impl<'a> Builder<'a> {
|
||||||
mut self,
|
mut self,
|
||||||
ctx: &CompletionContext,
|
ctx: &CompletionContext,
|
||||||
resolution: &hir::Resolution,
|
resolution: &hir::Resolution,
|
||||||
) -> Builder<'a> {
|
) -> Builder {
|
||||||
let resolved = resolution.def_id.map(|d| d.resolve(ctx.db));
|
let resolved = resolution.def_id.map(|d| d.resolve(ctx.db));
|
||||||
let kind = match resolved {
|
let kind = match resolved {
|
||||||
PerNs {
|
PerNs {
|
||||||
|
@ -259,7 +221,7 @@ impl<'a> Builder<'a> {
|
||||||
mut self,
|
mut self,
|
||||||
ctx: &CompletionContext,
|
ctx: &CompletionContext,
|
||||||
function: hir::Function,
|
function: hir::Function,
|
||||||
) -> Builder<'a> {
|
) -> Builder {
|
||||||
// If not an import, add parenthesis automatically.
|
// If not an import, add parenthesis automatically.
|
||||||
if ctx.use_item_syntax.is_none() && !ctx.is_call {
|
if ctx.use_item_syntax.is_none() && !ctx.is_call {
|
||||||
if function.signature(ctx.db).params().is_empty() {
|
if function.signature(ctx.db).params().is_empty() {
|
||||||
|
@ -274,7 +236,7 @@ impl<'a> Builder<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Into<CompletionItem> for Builder<'a> {
|
impl<'a> Into<CompletionItem> for Builder {
|
||||||
fn into(self) -> CompletionItem {
|
fn into(self) -> CompletionItem {
|
||||||
self.build()
|
self.build()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.835266+00:00
|
Created: 2019-01-19T16:37:23.674785+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,9 +11,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [62; 100),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -23,13 +24,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"quux()$0"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [62; 100),
|
|
||||||
insert: "quux()$0"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [62; 100),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.835796+00:00
|
Created: 2019-01-19T16:37:23.676585+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,9 +11,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [213; 231),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -23,9 +24,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [213; 231),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -35,13 +37,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"quux()$0"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [213; 231),
|
|
||||||
insert: "quux()$0"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [213; 231),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.835351+00:00
|
Created: 2019-01-19T16:37:23.676674+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,9 +11,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [78; 79),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -23,9 +24,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [78; 79),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -35,13 +37,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"quux($0)"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [78; 79),
|
|
||||||
insert: "quux($0)"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [78; 79),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.819543+00:00
|
Created: 2019-01-19T16:37:23.630898+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"if $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [54; 56),
|
|
||||||
insert: "if $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [54; 56),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -28,14 +26,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"match $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [54; 56),
|
|
||||||
insert: "match $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [54; 56),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -45,14 +41,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"while $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [54; 56),
|
|
||||||
insert: "while $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [54; 56),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -62,14 +56,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"loop {$0}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [54; 56),
|
|
||||||
insert: "loop {$0}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [54; 56),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -79,14 +71,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"continue;"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [54; 56),
|
|
||||||
insert: "continue;"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [54; 56),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -96,14 +86,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"break;"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [54; 56),
|
|
||||||
insert: "break;"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [54; 56),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -113,13 +101,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"return $0;"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [54; 56),
|
|
||||||
insert: "return $0;"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [54; 56),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.830288+00:00
|
Created: 2019-01-19T16:37:23.647435+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"if $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [59; 61),
|
|
||||||
insert: "if $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [59; 61),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -28,14 +26,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"match $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [59; 61),
|
|
||||||
insert: "match $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [59; 61),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -45,14 +41,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"while $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [59; 61),
|
|
||||||
insert: "while $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [59; 61),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -62,14 +56,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"loop {$0}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [59; 61),
|
|
||||||
insert: "loop {$0}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [59; 61),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -79,13 +71,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"return $0;"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [59; 61),
|
|
||||||
insert: "return $0;"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [59; 61),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T11:53:16.799862+00:00
|
Created: 2019-01-19T16:37:23.649286+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,8 +11,9 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [23; 25),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.821375+00:00
|
Created: 2019-01-19T16:37:23.640573+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"if $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [84; 102),
|
|
||||||
insert: "if $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [84; 102),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -28,14 +26,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"match $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [84; 102),
|
|
||||||
insert: "match $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [84; 102),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -45,14 +41,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"while $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [84; 102),
|
|
||||||
insert: "while $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [84; 102),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -62,14 +56,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"loop {$0}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [84; 102),
|
|
||||||
insert: "loop {$0}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [84; 102),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -79,13 +71,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"return $0"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [84; 102),
|
|
||||||
insert: "return $0"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [84; 102),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T11:53:16.799845+00:00
|
Created: 2019-01-19T16:37:23.670539+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,9 +11,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [35; 39),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -23,8 +24,9 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [35; 39),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T11:53:16.799820+00:00
|
Created: 2019-01-19T16:37:23.671764+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,8 +11,9 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [40; 41),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.841643+00:00
|
Created: 2019-01-19T16:37:23.680378+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,9 +11,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [108; 146),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -23,13 +24,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"foo()$0"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [108; 146),
|
|
||||||
insert: "foo()$0"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [108; 146),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.844671+00:00
|
Created: 2019-01-19T16:37:23.681170+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"no_args()$0"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [53; 56),
|
|
||||||
insert: "no_args()$0"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [53; 56),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -28,13 +26,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"main()$0"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [53; 56),
|
|
||||||
insert: "main()$0"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [53; 56),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.849139+00:00
|
Created: 2019-01-19T16:37:23.686781+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"main()$0"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [72; 77),
|
|
||||||
insert: "main()$0"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [72; 77),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -28,13 +26,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"with_args($0)"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [72; 77),
|
|
||||||
insert: "with_args($0)"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [72; 77),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.819926+00:00
|
Created: 2019-01-19T16:37:23.640068+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"if $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [24; 54),
|
|
||||||
insert: "if $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [24; 54),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -28,14 +26,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"match $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [24; 54),
|
|
||||||
insert: "match $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [24; 54),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -45,14 +41,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"while $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [24; 54),
|
|
||||||
insert: "while $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [24; 54),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -62,14 +56,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"loop {$0}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [24; 54),
|
|
||||||
insert: "loop {$0}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [24; 54),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -79,13 +71,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"return;"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [24; 54),
|
|
||||||
insert: "return;"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [24; 54),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.819839+00:00
|
Created: 2019-01-19T16:37:23.640134+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"if $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [91; 105),
|
|
||||||
insert: "if $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [91; 105),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -28,14 +26,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"match $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [91; 105),
|
|
||||||
insert: "match $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [91; 105),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -45,14 +41,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"while $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [91; 105),
|
|
||||||
insert: "while $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [91; 105),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -62,14 +56,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"loop {$0}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [91; 105),
|
|
||||||
insert: "loop {$0}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [91; 105),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -79,14 +71,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"else {$0}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [91; 105),
|
|
||||||
insert: "else {$0}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [91; 105),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -96,14 +86,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"else if $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [91; 105),
|
|
||||||
insert: "else if $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [91; 105),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -113,13 +101,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"return;"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [91; 105),
|
|
||||||
insert: "return;"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [91; 105),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.822255+00:00
|
Created: 2019-01-19T16:37:23.640767+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"if $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [31; 65),
|
|
||||||
insert: "if $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [31; 65),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -28,14 +26,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"match $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [31; 65),
|
|
||||||
insert: "match $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [31; 65),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -45,14 +41,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"while $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [31; 65),
|
|
||||||
insert: "while $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [31; 65),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -62,14 +56,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"loop {$0}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [31; 65),
|
|
||||||
insert: "loop {$0}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [31; 65),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -79,13 +71,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"return $0;"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [31; 65),
|
|
||||||
insert: "return $0;"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [31; 65),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.830680+00:00
|
Created: 2019-01-19T16:37:23.664707+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"if $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [24; 58),
|
|
||||||
insert: "if $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [24; 58),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -28,14 +26,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"match $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [24; 58),
|
|
||||||
insert: "match $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [24; 58),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -45,14 +41,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"while $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [24; 58),
|
|
||||||
insert: "while $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [24; 58),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -62,14 +56,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"loop {$0}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [24; 58),
|
|
||||||
insert: "loop {$0}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [24; 58),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -79,13 +71,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"return;"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [24; 58),
|
|
||||||
insert: "return;"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [24; 58),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.819227+00:00
|
Created: 2019-01-19T16:37:23.639067+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: PlainText,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"crate::"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [16; 30),
|
|
||||||
insert: "crate::"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: PlainText,
|
||||||
|
replace_range: [16; 30),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -28,9 +26,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [16; 30),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -40,13 +39,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: PlainText,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"super::"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [16; 30),
|
|
||||||
insert: "super::"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: PlainText,
|
||||||
|
replace_range: [16; 30),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.822990+00:00
|
Created: 2019-01-19T16:37:23.643595+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,9 +11,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [18; 20),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -23,13 +24,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: PlainText,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"super::"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [18; 20),
|
|
||||||
insert: "super::"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: PlainText,
|
||||||
|
replace_range: [18; 20),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.826915+00:00
|
Created: 2019-01-19T16:37:23.648502+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,9 +11,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [23; 24),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -23,13 +24,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: PlainText,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"super::"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [23; 24),
|
|
||||||
insert: "super::"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: PlainText,
|
||||||
|
replace_range: [23; 24),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.821139+00:00
|
Created: 2019-01-19T16:37:23.640449+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"if $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [62; 100),
|
|
||||||
insert: "if $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [62; 100),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -28,14 +26,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"match $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [62; 100),
|
|
||||||
insert: "match $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [62; 100),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -45,14 +41,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"while $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [62; 100),
|
|
||||||
insert: "while $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [62; 100),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -62,14 +56,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"loop {$0}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [62; 100),
|
|
||||||
insert: "loop {$0}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [62; 100),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -79,13 +71,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"return $0;"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [62; 100),
|
|
||||||
insert: "return $0;"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [62; 100),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.829078+00:00
|
Created: 2019-01-19T16:37:23.649440+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"if $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [62; 100),
|
|
||||||
insert: "if $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [62; 100),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -28,14 +26,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"match $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [62; 100),
|
|
||||||
insert: "match $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [62; 100),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -45,14 +41,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"while $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [62; 100),
|
|
||||||
insert: "while $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [62; 100),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -62,14 +56,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"loop {$0}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [62; 100),
|
|
||||||
insert: "loop {$0}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [62; 100),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -79,13 +71,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"return $0;"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [62; 100),
|
|
||||||
insert: "return $0;"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [62; 100),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.817204+00:00
|
Created: 2019-01-19T16:37:23.629020+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,13 +11,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"the_method($0)"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [143; 144),
|
|
||||||
insert: "the_method($0)"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [143; 144),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.835687+00:00
|
Created: 2019-01-19T16:37:23.676740+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"quux()$0"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [72; 102),
|
|
||||||
insert: "quux()$0"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [72; 102),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -28,9 +26,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [72; 102),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -40,8 +39,9 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [72; 102),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.836102+00:00
|
Created: 2019-01-19T16:37:23.677905+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"quux()$0"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [100; 102),
|
|
||||||
insert: "quux()$0"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [100; 102),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -28,8 +26,9 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [100; 102),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T11:53:16.799743+00:00
|
Created: 2019-01-19T16:37:23.666350+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,9 +11,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [12; 14),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -23,8 +24,9 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [12; 14),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.821881+00:00
|
Created: 2019-01-19T16:37:23.640842+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"if $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [106; 108),
|
|
||||||
insert: "if $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [106; 108),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -28,14 +26,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"match $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [106; 108),
|
|
||||||
insert: "match $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [106; 108),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -45,14 +41,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"while $0 {}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [106; 108),
|
|
||||||
insert: "while $0 {}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [106; 108),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -62,14 +56,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"loop {$0}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [106; 108),
|
|
||||||
insert: "loop {$0}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [106; 108),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -79,14 +71,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"continue"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [106; 108),
|
|
||||||
insert: "continue"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [106; 108),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -96,14 +86,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"break"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [106; 108),
|
|
||||||
insert: "break"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [106; 108),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Keyword,
|
completion_kind: Keyword,
|
||||||
|
@ -113,13 +101,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"return"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [106; 108),
|
|
||||||
insert: "return"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [106; 108),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T11:27:14.070727+00:00
|
Created: 2019-01-19T16:37:23.629063+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,8 +11,9 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
lookup: Some(
|
lookup: Some(
|
||||||
"file_id"
|
"file_id"
|
||||||
),
|
),
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [98; 102),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T11:29:09.355053+00:00
|
Created: 2019-01-19T16:37:23.629062+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,8 +11,9 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
lookup: Some(
|
lookup: Some(
|
||||||
"file_id"
|
"file_id"
|
||||||
),
|
),
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [98; 102),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T11:29:09.355066+00:00
|
Created: 2019-01-19T16:37:23.630980+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,8 +11,9 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
lookup: Some(
|
lookup: Some(
|
||||||
"file_id"
|
"file_id"
|
||||||
),
|
),
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [269; 273),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T11:53:16.799765+00:00
|
Created: 2019-01-19T16:37:23.664242+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,9 +11,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [45; 47),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -23,8 +24,9 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [45; 47),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.837692+00:00
|
Created: 2019-01-19T16:37:23.678426+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,9 +11,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [46; 60),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -23,13 +24,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"x()$0"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [46; 60),
|
|
||||||
insert: "x()$0"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [46; 60),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T11:59:18.394156+00:00
|
Created: 2019-01-19T16:37:23.679470+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,8 +11,9 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [24; 26),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.844708+00:00
|
Created: 2019-01-19T16:37:23.681192+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,14 +11,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"eprintln!(\"$0 = {:?}\", $0);"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [16; 18),
|
|
||||||
insert: "eprintln!(\"$0 = {:?}\", $0);"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [16; 18),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Snippet,
|
completion_kind: Snippet,
|
||||||
|
@ -28,13 +26,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"eprintln!(\"$0 = {:#?}\", $0);"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [16; 18),
|
|
||||||
insert: "eprintln!(\"$0 = {:#?}\", $0);"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [16; 18),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.845616+00:00
|
Created: 2019-01-19T16:37:23.682017+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -13,14 +13,12 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
lookup: Some(
|
lookup: Some(
|
||||||
"tfn"
|
"tfn"
|
||||||
),
|
),
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"#[test]\nfn ${1:feature}() {\n $0\n}"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [49; 79),
|
|
||||||
insert: "#[test]\nfn ${1:feature}() {\n $0\n}"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [49; 79),
|
||||||
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Snippet,
|
completion_kind: Snippet,
|
||||||
|
@ -30,13 +28,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"pub(crate) $0"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [49; 79),
|
|
||||||
insert: "pub(crate) $0"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [49; 79),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T11:34:11.702218+00:00
|
Created: 2019-01-19T16:37:23.628928+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -13,8 +13,9 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
"u32"
|
"u32"
|
||||||
),
|
),
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [84; 85),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.817216+00:00
|
Created: 2019-01-19T16:37:23.629043+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -13,9 +13,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
"(u32, i32)"
|
"(u32, i32)"
|
||||||
),
|
),
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [125; 126),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -25,13 +26,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"foo($0)"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [125; 126),
|
|
||||||
insert: "foo($0)"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [125; 126),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T13:42:17.817207+00:00
|
Created: 2019-01-19T16:37:23.629041+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -13,9 +13,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
"(u32,)"
|
"(u32,)"
|
||||||
),
|
),
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [120; 121),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -25,13 +26,11 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
insert_text_format: Snippet,
|
insert_text: Some(
|
||||||
text_edit: Some(
|
"foo($0)"
|
||||||
AtomTextEdit {
|
|
||||||
delete: [120; 121),
|
|
||||||
insert: "foo($0)"
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
additional_text_edits: None
|
insert_text_format: Snippet,
|
||||||
|
replace_range: [120; 121),
|
||||||
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T11:53:16.799683+00:00
|
Created: 2019-01-19T16:37:23.667522+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,9 +11,10 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [11; 13),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
completion_kind: Reference,
|
completion_kind: Reference,
|
||||||
|
@ -23,8 +24,9 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [11; 13),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Created: 2019-01-19T11:53:16.799788+00:00
|
Created: 2019-01-19T16:37:23.669476+00:00
|
||||||
Creator: insta@0.1.4
|
Creator: insta@0.1.4
|
||||||
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
|
|
||||||
|
@ -11,8 +11,9 @@ Source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||||
),
|
),
|
||||||
detail: None,
|
detail: None,
|
||||||
lookup: None,
|
lookup: None,
|
||||||
|
insert_text: None,
|
||||||
insert_text_format: PlainText,
|
insert_text_format: PlainText,
|
||||||
text_edit: None,
|
replace_range: [24; 26),
|
||||||
additional_text_edits: None
|
delete_range: None
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -13,6 +13,7 @@ use ra_syntax::{SyntaxKind, TextRange, TextUnit};
|
||||||
use ra_text_edit::{AtomTextEdit, TextEdit};
|
use ra_text_edit::{AtomTextEdit, TextEdit};
|
||||||
|
|
||||||
use crate::{req, server_world::ServerWorld, Result};
|
use crate::{req, server_world::ServerWorld, Result};
|
||||||
|
use ra_text_edit::TextEditBuilder;
|
||||||
|
|
||||||
pub trait Conv {
|
pub trait Conv {
|
||||||
type Output;
|
type Output;
|
||||||
|
@ -78,19 +79,24 @@ impl ConvWith for CompletionItem {
|
||||||
type Ctx = LineIndex;
|
type Ctx = LineIndex;
|
||||||
type Output = ::lsp_types::CompletionItem;
|
type Output = ::lsp_types::CompletionItem;
|
||||||
|
|
||||||
fn conv_with(mut self, ctx: &LineIndex) -> ::lsp_types::CompletionItem {
|
fn conv_with(self, ctx: &LineIndex) -> ::lsp_types::CompletionItem {
|
||||||
let text_edit = self.text_edit().map(|t| t.conv_with(ctx));
|
let atom_text_edit = AtomTextEdit::replace(self.replace_range(), self.insert_text());
|
||||||
let additonal_text_edit = self
|
let text_edit = (&atom_text_edit).conv_with(ctx);
|
||||||
.take_additional_text_edits()
|
let additional_text_edits = if let Some(delete_range) = self.delete_range() {
|
||||||
.map(|it| it.conv_with(ctx));
|
let mut builder = TextEditBuilder::default();
|
||||||
|
builder.delete(delete_range);
|
||||||
|
Some(builder.finish().conv_with(ctx))
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
|
|
||||||
let mut res = lsp_types::CompletionItem {
|
let mut res = lsp_types::CompletionItem {
|
||||||
label: self.label().to_string(),
|
label: self.label().to_string(),
|
||||||
detail: self.detail().map(|it| it.to_string()),
|
detail: self.detail().map(|it| it.to_string()),
|
||||||
filter_text: Some(self.lookup().to_string()),
|
filter_text: Some(self.lookup().to_string()),
|
||||||
kind: self.kind().map(|it| it.conv()),
|
kind: self.kind().map(|it| it.conv()),
|
||||||
text_edit,
|
text_edit: Some(text_edit),
|
||||||
additional_text_edits: additonal_text_edit,
|
additional_text_edits,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
res.insert_text_format = Some(match self.insert_text_format() {
|
res.insert_text_format = Some(match self.insert_text_format() {
|
||||||
|
|
Loading…
Reference in a new issue