diff options
60 files changed, 705 insertions, 1920 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index 26ebc445b..9da8a482d 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs | |||
@@ -290,7 +290,11 @@ impl Struct { | |||
290 | } | 290 | } |
291 | 291 | ||
292 | pub fn ty(&self, db: &impl HirDatabase) -> Ty { | 292 | pub fn ty(&self, db: &impl HirDatabase) -> Ty { |
293 | db.type_for_def((*self).into()) | 293 | db.type_for_def((*self).into(), Namespace::Types) |
294 | } | ||
295 | |||
296 | pub fn constructor_ty(&self, db: &impl HirDatabase) -> Ty { | ||
297 | db.type_for_def((*self).into(), Namespace::Values) | ||
294 | } | 298 | } |
295 | 299 | ||
296 | // TODO move to a more general type | 300 | // TODO move to a more general type |
@@ -350,7 +354,7 @@ impl Enum { | |||
350 | } | 354 | } |
351 | 355 | ||
352 | pub fn ty(&self, db: &impl HirDatabase) -> Ty { | 356 | pub fn ty(&self, db: &impl HirDatabase) -> Ty { |
353 | db.type_for_def((*self).into()) | 357 | db.type_for_def((*self).into(), Namespace::Types) |
354 | } | 358 | } |
355 | 359 | ||
356 | // TODO: move to a more general type | 360 | // TODO: move to a more general type |
@@ -425,7 +429,7 @@ pub struct Function { | |||
425 | pub(crate) id: FunctionId, | 429 | pub(crate) id: FunctionId, |
426 | } | 430 | } |
427 | 431 | ||
428 | pub use crate::expr::ScopeEntryWithSyntax; | 432 | pub use crate::{ nameres::Namespace, expr::ScopeEntryWithSyntax}; |
429 | 433 | ||
430 | /// The declared signature of a function. | 434 | /// The declared signature of a function. |
431 | #[derive(Debug, Clone, PartialEq, Eq)] | 435 | #[derive(Debug, Clone, PartialEq, Eq)] |
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index 740a7be7a..fc0ee068c 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -15,7 +15,7 @@ use crate::{ | |||
15 | adt::{StructData, EnumData}, | 15 | adt::{StructData, EnumData}, |
16 | impl_block::{ModuleImplBlocks, ImplSourceMap}, | 16 | impl_block::{ModuleImplBlocks, ImplSourceMap}, |
17 | generics::{GenericParams, GenericDef}, | 17 | generics::{GenericParams, GenericDef}, |
18 | ids::SourceFileItemId, | 18 | ids::SourceFileItemId, nameres::Namespace |
19 | }; | 19 | }; |
20 | 20 | ||
21 | #[salsa::query_group(PersistentHirDatabaseStorage)] | 21 | #[salsa::query_group(PersistentHirDatabaseStorage)] |
@@ -88,7 +88,7 @@ pub trait HirDatabase: PersistentHirDatabase { | |||
88 | fn infer(&self, func: Function) -> Arc<InferenceResult>; | 88 | fn infer(&self, func: Function) -> Arc<InferenceResult>; |
89 | 89 | ||
90 | #[salsa::invoke(crate::ty::type_for_def)] | 90 | #[salsa::invoke(crate::ty::type_for_def)] |
91 | fn type_for_def(&self, def: TypableDef) -> Ty; | 91 | fn type_for_def(&self, def: TypableDef, ns: Namespace) -> Ty; |
92 | 92 | ||
93 | #[salsa::invoke(crate::ty::type_for_field)] | 93 | #[salsa::invoke(crate::ty::type_for_field)] |
94 | fn type_for_field(&self, field: StructField) -> Ty; | 94 | fn type_for_field(&self, field: StructField) -> Ty; |
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index e35b4b129..bd920bfea 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs | |||
@@ -348,7 +348,7 @@ where | |||
348 | .into_iter() | 348 | .into_iter() |
349 | .filter_map(|variant| { | 349 | .filter_map(|variant| { |
350 | let res = Resolution { | 350 | let res = Resolution { |
351 | def: PerNs::both(variant.into(), e.into()), | 351 | def: PerNs::both(variant.into(), variant.into()), |
352 | import: Some(import_id), | 352 | import: Some(import_id), |
353 | }; | 353 | }; |
354 | let name = variant.name(self.db)?; | 354 | let name = variant.name(self.db)?; |
@@ -628,7 +628,7 @@ impl ItemMap { | |||
628 | // enum variant | 628 | // enum variant |
629 | tested_by!(item_map_enum_importing); | 629 | tested_by!(item_map_enum_importing); |
630 | match e.variant(db, &segment.name) { | 630 | match e.variant(db, &segment.name) { |
631 | Some(variant) => PerNs::both(variant.into(), (*e).into()), | 631 | Some(variant) => PerNs::both(variant.into(), variant.into()), |
632 | None => PerNs::none(), | 632 | None => PerNs::none(), |
633 | } | 633 | } |
634 | } | 634 | } |
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs index e1f369a20..d4d896673 100644 --- a/crates/ra_hir/src/ty.rs +++ b/crates/ra_hir/src/ty.rs | |||
@@ -42,7 +42,7 @@ use crate::{ | |||
42 | generics::GenericParams, | 42 | generics::GenericParams, |
43 | path::GenericArg, | 43 | path::GenericArg, |
44 | adt::VariantDef, | 44 | adt::VariantDef, |
45 | resolve::{Resolver, Resolution}, | 45 | resolve::{Resolver, Resolution}, nameres::Namespace |
46 | }; | 46 | }; |
47 | 47 | ||
48 | /// The ID of a type variable. | 48 | /// The ID of a type variable. |
@@ -226,6 +226,8 @@ pub enum Ty { | |||
226 | /// function has a unique type, which is output (for a function | 226 | /// function has a unique type, which is output (for a function |
227 | /// named `foo` returning an `i32`) as `fn() -> i32 {foo}`. | 227 | /// named `foo` returning an `i32`) as `fn() -> i32 {foo}`. |
228 | /// | 228 | /// |
229 | /// This includes tuple struct / enum variant constructors as well. | ||
230 | /// | ||
229 | /// For example the type of `bar` here: | 231 | /// For example the type of `bar` here: |
230 | /// | 232 | /// |
231 | /// ```rust | 233 | /// ```rust |
@@ -233,8 +235,8 @@ pub enum Ty { | |||
233 | /// let bar = foo; // bar: fn() -> i32 {foo} | 235 | /// let bar = foo; // bar: fn() -> i32 {foo} |
234 | /// ``` | 236 | /// ``` |
235 | FnDef { | 237 | FnDef { |
236 | // Function definition | 238 | /// The definition of the function / constructor. |
237 | def: Function, | 239 | def: CallableDef, |
238 | /// For display | 240 | /// For display |
239 | name: Name, | 241 | name: Name, |
240 | /// Parameters and return type | 242 | /// Parameters and return type |
@@ -396,7 +398,7 @@ impl Ty { | |||
396 | None => return Ty::Unknown, | 398 | None => return Ty::Unknown, |
397 | Some(it) => it, | 399 | Some(it) => it, |
398 | }; | 400 | }; |
399 | let ty = db.type_for_def(typable); | 401 | let ty = db.type_for_def(typable, Namespace::Types); |
400 | let substs = Ty::substs_from_path(db, resolver, path, typable); | 402 | let substs = Ty::substs_from_path(db, resolver, path, typable); |
401 | ty.apply_substs(substs) | 403 | ty.apply_substs(substs) |
402 | } | 404 | } |
@@ -673,7 +675,47 @@ fn type_for_fn(db: &impl HirDatabase, def: Function) -> Ty { | |||
673 | let output = Ty::from_hir(db, &resolver, signature.ret_type()); | 675 | let output = Ty::from_hir(db, &resolver, signature.ret_type()); |
674 | let sig = Arc::new(FnSig { input, output }); | 676 | let sig = Arc::new(FnSig { input, output }); |
675 | let substs = make_substs(&generics); | 677 | let substs = make_substs(&generics); |
676 | Ty::FnDef { def, sig, name, substs } | 678 | Ty::FnDef { def: def.into(), sig, name, substs } |
679 | } | ||
680 | |||
681 | /// Compute the type of a tuple struct constructor. | ||
682 | fn type_for_struct_constructor(db: &impl HirDatabase, def: Struct) -> Ty { | ||
683 | let var_data = def.variant_data(db); | ||
684 | let fields = match var_data.fields() { | ||
685 | Some(fields) => fields, | ||
686 | None => return type_for_struct(db, def), // Unit struct | ||
687 | }; | ||
688 | let resolver = def.resolver(db); | ||
689 | let generics = def.generic_params(db); | ||
690 | let name = def.name(db).unwrap_or_else(Name::missing); | ||
691 | let input = fields | ||
692 | .iter() | ||
693 | .map(|(_, field)| Ty::from_hir(db, &resolver, &field.type_ref)) | ||
694 | .collect::<Vec<_>>(); | ||
695 | let output = type_for_struct(db, def); | ||
696 | let sig = Arc::new(FnSig { input, output }); | ||
697 | let substs = make_substs(&generics); | ||
698 | Ty::FnDef { def: def.into(), sig, name, substs } | ||
699 | } | ||
700 | |||
701 | /// Compute the type of a tuple enum variant constructor. | ||
702 | fn type_for_enum_variant_constructor(db: &impl HirDatabase, def: EnumVariant) -> Ty { | ||
703 | let var_data = def.variant_data(db); | ||
704 | let fields = match var_data.fields() { | ||
705 | Some(fields) => fields, | ||
706 | None => return type_for_enum(db, def.parent_enum(db)), // Unit variant | ||
707 | }; | ||
708 | let resolver = def.parent_enum(db).resolver(db); | ||
709 | let generics = def.parent_enum(db).generic_params(db); | ||
710 | let name = def.name(db).unwrap_or_else(Name::missing); | ||
711 | let input = fields | ||
712 | .iter() | ||
713 | .map(|(_, field)| Ty::from_hir(db, &resolver, &field.type_ref)) | ||
714 | .collect::<Vec<_>>(); | ||
715 | let output = type_for_enum(db, def.parent_enum(db)); | ||
716 | let sig = Arc::new(FnSig { input, output }); | ||
717 | let substs = make_substs(&generics); | ||
718 | Ty::FnDef { def: def.into(), sig, name, substs } | ||
677 | } | 719 | } |
678 | 720 | ||
679 | fn make_substs(generics: &GenericParams) -> Substs { | 721 | fn make_substs(generics: &GenericParams) -> Substs { |
@@ -703,12 +745,6 @@ pub(crate) fn type_for_enum(db: &impl HirDatabase, s: Enum) -> Ty { | |||
703 | } | 745 | } |
704 | } | 746 | } |
705 | 747 | ||
706 | pub(crate) fn type_for_enum_variant(db: &impl HirDatabase, ev: EnumVariant) -> Ty { | ||
707 | let enum_parent = ev.parent_enum(db); | ||
708 | |||
709 | type_for_enum(db, enum_parent) | ||
710 | } | ||
711 | |||
712 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] | 748 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
713 | pub enum TypableDef { | 749 | pub enum TypableDef { |
714 | Function(Function), | 750 | Function(Function), |
@@ -735,12 +771,26 @@ impl From<ModuleDef> for Option<TypableDef> { | |||
735 | } | 771 | } |
736 | } | 772 | } |
737 | 773 | ||
738 | pub(super) fn type_for_def(db: &impl HirDatabase, def: TypableDef) -> Ty { | 774 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
739 | match def { | 775 | pub enum CallableDef { |
740 | TypableDef::Function(f) => type_for_fn(db, f), | 776 | Function(Function), |
741 | TypableDef::Struct(s) => type_for_struct(db, s), | 777 | Struct(Struct), |
742 | TypableDef::Enum(e) => type_for_enum(db, e), | 778 | EnumVariant(EnumVariant), |
743 | TypableDef::EnumVariant(v) => type_for_enum_variant(db, v), | 779 | } |
780 | impl_froms!(CallableDef: Function, Struct, EnumVariant); | ||
781 | |||
782 | pub(super) fn type_for_def(db: &impl HirDatabase, def: TypableDef, ns: Namespace) -> Ty { | ||
783 | match (def, ns) { | ||
784 | (TypableDef::Function(f), Namespace::Values) => type_for_fn(db, f), | ||
785 | (TypableDef::Struct(s), Namespace::Types) => type_for_struct(db, s), | ||
786 | (TypableDef::Struct(s), Namespace::Values) => type_for_struct_constructor(db, s), | ||
787 | (TypableDef::Enum(e), Namespace::Types) => type_for_enum(db, e), | ||
788 | (TypableDef::EnumVariant(v), Namespace::Values) => type_for_enum_variant_constructor(db, v), | ||
789 | |||
790 | // 'error' cases: | ||
791 | (TypableDef::Function(_), Namespace::Types) => Ty::Unknown, | ||
792 | (TypableDef::Enum(_), Namespace::Values) => Ty::Unknown, | ||
793 | (TypableDef::EnumVariant(_), Namespace::Types) => Ty::Unknown, | ||
744 | } | 794 | } |
745 | } | 795 | } |
746 | 796 | ||
@@ -1128,7 +1178,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
1128 | let typable: Option<TypableDef> = def.into(); | 1178 | let typable: Option<TypableDef> = def.into(); |
1129 | let typable = typable?; | 1179 | let typable = typable?; |
1130 | let substs = Ty::substs_from_path(self.db, &self.resolver, path, typable); | 1180 | let substs = Ty::substs_from_path(self.db, &self.resolver, path, typable); |
1131 | let ty = self.db.type_for_def(typable).apply_substs(substs); | 1181 | let ty = self.db.type_for_def(typable, Namespace::Values).apply_substs(substs); |
1132 | let ty = self.insert_type_vars(ty); | 1182 | let ty = self.insert_type_vars(ty); |
1133 | Some(ty) | 1183 | Some(ty) |
1134 | } | 1184 | } |
@@ -1179,12 +1229,12 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
1179 | let substs = Ty::substs_from_path(self.db, resolver, path, def); | 1229 | let substs = Ty::substs_from_path(self.db, resolver, path, def); |
1180 | match def { | 1230 | match def { |
1181 | TypableDef::Struct(s) => { | 1231 | TypableDef::Struct(s) => { |
1182 | let ty = type_for_struct(self.db, s); | 1232 | let ty = s.ty(self.db); |
1183 | let ty = self.insert_type_vars(ty.apply_substs(substs)); | 1233 | let ty = self.insert_type_vars(ty.apply_substs(substs)); |
1184 | (ty, Some(s.into())) | 1234 | (ty, Some(s.into())) |
1185 | } | 1235 | } |
1186 | TypableDef::EnumVariant(var) => { | 1236 | TypableDef::EnumVariant(var) => { |
1187 | let ty = type_for_enum_variant(self.db, var); | 1237 | let ty = var.parent_enum(self.db).ty(self.db); |
1188 | let ty = self.insert_type_vars(ty.apply_substs(substs)); | 1238 | let ty = self.insert_type_vars(ty.apply_substs(substs)); |
1189 | (ty, Some(var.into())) | 1239 | (ty, Some(var.into())) |
1190 | } | 1240 | } |
@@ -1385,7 +1435,11 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
1385 | let (derefed_receiver_ty, method_ty, def_generics) = match resolved { | 1435 | let (derefed_receiver_ty, method_ty, def_generics) = match resolved { |
1386 | Some((ty, func)) => { | 1436 | Some((ty, func)) => { |
1387 | self.write_method_resolution(tgt_expr, func); | 1437 | self.write_method_resolution(tgt_expr, func); |
1388 | (ty, self.db.type_for_def(func.into()), Some(func.generic_params(self.db))) | 1438 | ( |
1439 | ty, | ||
1440 | self.db.type_for_def(func.into(), Namespace::Values), | ||
1441 | Some(func.generic_params(self.db)), | ||
1442 | ) | ||
1389 | } | 1443 | } |
1390 | None => (Ty::Unknown, receiver_ty, None), | 1444 | None => (Ty::Unknown, receiver_ty, None), |
1391 | }; | 1445 | }; |
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap index 8747fae18..294186b06 100644 --- a/crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap +++ b/crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap | |||
@@ -1,21 +1,21 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-24T14:51:32.808861856+00:00" | 2 | created: "2019-02-17T16:16:58.863630956Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: "&result" | ||
5 | source: crates/ra_hir/src/ty/tests.rs | 4 | source: crates/ra_hir/src/ty/tests.rs |
5 | expression: "&result" | ||
6 | --- | 6 | --- |
7 | [72; 154) '{ ...a.c; }': () | 7 | [72; 154) '{ ...a.c; }': () |
8 | [82; 83) 'c': [unknown] | 8 | [82; 83) 'c': C |
9 | [86; 87) 'C': C | 9 | [86; 87) 'C': fn C(usize) -> C |
10 | [86; 90) 'C(1)': [unknown] | 10 | [86; 90) 'C(1)': C |
11 | [88; 89) '1': i32 | 11 | [88; 89) '1': usize |
12 | [96; 97) 'B': B | 12 | [96; 97) 'B': B |
13 | [107; 108) 'a': A | 13 | [107; 108) 'a': A |
14 | [114; 133) 'A { b:...C(1) }': A | 14 | [114; 133) 'A { b:...C(1) }': A |
15 | [121; 122) 'B': B | 15 | [121; 122) 'B': B |
16 | [127; 128) 'C': C | 16 | [127; 128) 'C': fn C(usize) -> C |
17 | [127; 131) 'C(1)': C | 17 | [127; 131) 'C(1)': C |
18 | [129; 130) '1': i32 | 18 | [129; 130) '1': usize |
19 | [139; 140) 'a': A | 19 | [139; 140) 'a': A |
20 | [139; 142) 'a.b': B | 20 | [139; 142) 'a.b': B |
21 | [148; 149) 'a': A | 21 | [148; 149) 'a': A |
diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs index ed0b0b7e5..7b93b5df8 100644 --- a/crates/ra_ide_api/src/completion/completion_item.rs +++ b/crates/ra_ide_api/src/completion/completion_item.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | use std::fmt; | ||
2 | |||
1 | use hir::{Docs, Documentation, PerNs, Resolution}; | 3 | use hir::{Docs, Documentation, PerNs, Resolution}; |
2 | use ra_syntax::{ | 4 | use ra_syntax::TextRange; |
3 | TextRange, | ||
4 | }; | ||
5 | use ra_text_edit::TextEdit; | 5 | use ra_text_edit::TextEdit; |
6 | use test_utils::tested_by; | 6 | use test_utils::tested_by; |
7 | 7 | ||
@@ -15,16 +15,16 @@ use crate::completion::{ | |||
15 | /// `CompletionItem` describes a single completion variant in the editor pop-up. | 15 | /// `CompletionItem` describes a single completion variant in the editor pop-up. |
16 | /// It is basically a POD with various properties. To construct a | 16 | /// It is basically a POD with various properties. To construct a |
17 | /// `CompletionItem`, use `new` method and the `Builder` struct. | 17 | /// `CompletionItem`, use `new` method and the `Builder` struct. |
18 | #[derive(Debug)] | ||
19 | pub struct CompletionItem { | 18 | pub struct CompletionItem { |
20 | /// Used only internally in tests, to check only specific kind of | 19 | /// Used only internally in tests, to check only specific kind of |
21 | /// completion. | 20 | /// completion. |
21 | #[allow(unused)] | ||
22 | completion_kind: CompletionKind, | 22 | completion_kind: CompletionKind, |
23 | label: String, | 23 | label: String, |
24 | kind: Option<CompletionItemKind>, | 24 | kind: Option<CompletionItemKind>, |
25 | lookup: Option<String>, | ||
25 | detail: Option<String>, | 26 | detail: Option<String>, |
26 | documentation: Option<Documentation>, | 27 | documentation: Option<Documentation>, |
27 | lookup: Option<String>, | ||
28 | insert_text: Option<String>, | 28 | insert_text: Option<String>, |
29 | insert_text_format: InsertTextFormat, | 29 | insert_text_format: InsertTextFormat, |
30 | /// Where completion occurs. `source_range` must contain the completion offset. | 30 | /// Where completion occurs. `source_range` must contain the completion offset. |
@@ -36,6 +36,33 @@ pub struct CompletionItem { | |||
36 | text_edit: Option<TextEdit>, | 36 | text_edit: Option<TextEdit>, |
37 | } | 37 | } |
38 | 38 | ||
39 | impl fmt::Debug for CompletionItem { | ||
40 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | ||
41 | let mut s = f.debug_struct("CompletionItem"); | ||
42 | s.field("label", &self.label()).field("source_range", &self.source_range()); | ||
43 | if let Some(kind) = self.kind().as_ref() { | ||
44 | s.field("kind", kind); | ||
45 | } | ||
46 | if self.lookup() != self.label() { | ||
47 | s.field("lookup", &self.lookup()); | ||
48 | } | ||
49 | if let Some(detail) = self.detail() { | ||
50 | s.field("detail", &detail); | ||
51 | } | ||
52 | if let Some(documentation) = self.documentation() { | ||
53 | s.field("documentation", &documentation); | ||
54 | } | ||
55 | if self.insert_text() != self.label() { | ||
56 | s.field("insert_text", &self.insert_text()) | ||
57 | .field("insert_text_format", &self.insert_text_format()); | ||
58 | } | ||
59 | if let Some(edit) = self.text_edit.as_ref() { | ||
60 | s.field("text_edit", edit); | ||
61 | } | ||
62 | s.finish() | ||
63 | } | ||
64 | } | ||
65 | |||
39 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] | 66 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] |
40 | pub enum CompletionItemKind { | 67 | pub enum CompletionItemKind { |
41 | Snippet, | 68 | Snippet, |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap index 31df6565b..799daa724 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap | |||
@@ -1,40 +1,21 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.944446814+00:00" | 2 | created: "2019-02-18T07:29:59.736783986Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "quux", | 9 | label: "quux", |
11 | kind: Some( | ||
12 | Function | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "fn quux()" | ||
16 | ), | ||
17 | documentation: None, | ||
18 | lookup: None, | ||
19 | insert_text: Some( | ||
20 | "quux()$0" | ||
21 | ), | ||
22 | insert_text_format: Snippet, | ||
23 | source_range: [83; 83), | 10 | source_range: [83; 83), |
24 | text_edit: None | 11 | kind: Function, |
12 | detail: "fn quux()", | ||
13 | insert_text: "quux()$0", | ||
14 | insert_text_format: Snippet | ||
25 | }, | 15 | }, |
26 | CompletionItem { | 16 | CompletionItem { |
27 | completion_kind: Reference, | ||
28 | label: "x", | 17 | label: "x", |
29 | kind: Some( | ||
30 | Binding | ||
31 | ), | ||
32 | detail: None, | ||
33 | documentation: None, | ||
34 | lookup: None, | ||
35 | insert_text: None, | ||
36 | insert_text_format: PlainText, | ||
37 | source_range: [83; 83), | 18 | source_range: [83; 83), |
38 | text_edit: None | 19 | kind: Binding |
39 | } | 20 | } |
40 | ] | 21 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap index 9f37bae36..e6c1a936a 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap | |||
@@ -1,54 +1,26 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.946956414+00:00" | 2 | created: "2019-02-18T07:29:59.739513594Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "a", | 9 | label: "a", |
11 | kind: Some( | ||
12 | Binding | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [214; 214), | 10 | source_range: [214; 214), |
20 | text_edit: None | 11 | kind: Binding |
21 | }, | 12 | }, |
22 | CompletionItem { | 13 | CompletionItem { |
23 | completion_kind: Reference, | ||
24 | label: "b", | 14 | label: "b", |
25 | kind: Some( | ||
26 | Binding | ||
27 | ), | ||
28 | detail: None, | ||
29 | documentation: None, | ||
30 | lookup: None, | ||
31 | insert_text: None, | ||
32 | insert_text_format: PlainText, | ||
33 | source_range: [214; 214), | 15 | source_range: [214; 214), |
34 | text_edit: None | 16 | kind: Binding |
35 | }, | 17 | }, |
36 | CompletionItem { | 18 | CompletionItem { |
37 | completion_kind: Reference, | ||
38 | label: "quux", | 19 | label: "quux", |
39 | kind: Some( | ||
40 | Function | ||
41 | ), | ||
42 | detail: Some( | ||
43 | "fn quux()" | ||
44 | ), | ||
45 | documentation: None, | ||
46 | lookup: None, | ||
47 | insert_text: Some( | ||
48 | "quux()$0" | ||
49 | ), | ||
50 | insert_text_format: Snippet, | ||
51 | source_range: [214; 214), | 20 | source_range: [214; 214), |
52 | text_edit: None | 21 | kind: Function, |
22 | detail: "fn quux()", | ||
23 | insert_text: "quux()$0", | ||
24 | insert_text_format: Snippet | ||
53 | } | 25 | } |
54 | ] | 26 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap index f4808bc93..2b0da7d73 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap | |||
@@ -1,54 +1,26 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.948953759+00:00" | 2 | created: "2019-02-18T07:29:59.739513592Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "quux", | 9 | label: "quux", |
11 | kind: Some( | ||
12 | Function | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "fn quux(x: i32)" | ||
16 | ), | ||
17 | documentation: None, | ||
18 | lookup: None, | ||
19 | insert_text: Some( | ||
20 | "quux($0)" | ||
21 | ), | ||
22 | insert_text_format: Snippet, | ||
23 | source_range: [79; 79), | 10 | source_range: [79; 79), |
24 | text_edit: None | 11 | kind: Function, |
12 | detail: "fn quux(x: i32)", | ||
13 | insert_text: "quux($0)", | ||
14 | insert_text_format: Snippet | ||
25 | }, | 15 | }, |
26 | CompletionItem { | 16 | CompletionItem { |
27 | completion_kind: Reference, | ||
28 | label: "x", | 17 | label: "x", |
29 | kind: Some( | ||
30 | Binding | ||
31 | ), | ||
32 | detail: None, | ||
33 | documentation: None, | ||
34 | lookup: None, | ||
35 | insert_text: None, | ||
36 | insert_text_format: PlainText, | ||
37 | source_range: [79; 79), | 18 | source_range: [79; 79), |
38 | text_edit: None | 19 | kind: Binding |
39 | }, | 20 | }, |
40 | CompletionItem { | 21 | CompletionItem { |
41 | completion_kind: Reference, | ||
42 | label: "y", | 22 | label: "y", |
43 | kind: Some( | ||
44 | Binding | ||
45 | ), | ||
46 | detail: None, | ||
47 | documentation: None, | ||
48 | lookup: None, | ||
49 | insert_text: None, | ||
50 | insert_text_format: PlainText, | ||
51 | source_range: [79; 79), | 23 | source_range: [79; 79), |
52 | text_edit: None | 24 | kind: Binding |
53 | } | 25 | } |
54 | ] | 26 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops1.snap index 25ccbdb8f..5d62a6cb0 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops1.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops1.snap | |||
@@ -1,120 +1,57 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.913816522+00:00" | 2 | created: "2019-02-18T07:29:59.630948152Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | ||
10 | label: "break", | 9 | label: "break", |
11 | kind: Some( | ||
12 | Keyword | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: Some( | ||
18 | "break;" | ||
19 | ), | ||
20 | insert_text_format: Snippet, | ||
21 | source_range: [55; 55), | 10 | source_range: [55; 55), |
22 | text_edit: None | 11 | kind: Keyword, |
12 | insert_text: "break;", | ||
13 | insert_text_format: Snippet | ||
23 | }, | 14 | }, |
24 | CompletionItem { | 15 | CompletionItem { |
25 | completion_kind: Keyword, | ||
26 | label: "continue", | 16 | label: "continue", |
27 | kind: Some( | ||
28 | Keyword | ||
29 | ), | ||
30 | detail: None, | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "continue;" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [55; 55), | 17 | source_range: [55; 55), |
38 | text_edit: None | 18 | kind: Keyword, |
19 | insert_text: "continue;", | ||
20 | insert_text_format: Snippet | ||
39 | }, | 21 | }, |
40 | CompletionItem { | 22 | CompletionItem { |
41 | completion_kind: Keyword, | ||
42 | label: "if", | 23 | label: "if", |
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | documentation: None, | ||
48 | lookup: None, | ||
49 | insert_text: Some( | ||
50 | "if $0 {}" | ||
51 | ), | ||
52 | insert_text_format: Snippet, | ||
53 | source_range: [55; 55), | 24 | source_range: [55; 55), |
54 | text_edit: None | 25 | kind: Keyword, |
26 | insert_text: "if $0 {}", | ||
27 | insert_text_format: Snippet | ||
55 | }, | 28 | }, |
56 | CompletionItem { | 29 | CompletionItem { |
57 | completion_kind: Keyword, | ||
58 | label: "loop", | 30 | label: "loop", |
59 | kind: Some( | ||
60 | Keyword | ||
61 | ), | ||
62 | detail: None, | ||
63 | documentation: None, | ||
64 | lookup: None, | ||
65 | insert_text: Some( | ||
66 | "loop {$0}" | ||
67 | ), | ||
68 | insert_text_format: Snippet, | ||
69 | source_range: [55; 55), | 31 | source_range: [55; 55), |
70 | text_edit: None | 32 | kind: Keyword, |
33 | insert_text: "loop {$0}", | ||
34 | insert_text_format: Snippet | ||
71 | }, | 35 | }, |
72 | CompletionItem { | 36 | CompletionItem { |
73 | completion_kind: Keyword, | ||
74 | label: "match", | 37 | label: "match", |
75 | kind: Some( | ||
76 | Keyword | ||
77 | ), | ||
78 | detail: None, | ||
79 | documentation: None, | ||
80 | lookup: None, | ||
81 | insert_text: Some( | ||
82 | "match $0 {}" | ||
83 | ), | ||
84 | insert_text_format: Snippet, | ||
85 | source_range: [55; 55), | 38 | source_range: [55; 55), |
86 | text_edit: None | 39 | kind: Keyword, |
40 | insert_text: "match $0 {}", | ||
41 | insert_text_format: Snippet | ||
87 | }, | 42 | }, |
88 | CompletionItem { | 43 | CompletionItem { |
89 | completion_kind: Keyword, | ||
90 | label: "return", | 44 | label: "return", |
91 | kind: Some( | ||
92 | Keyword | ||
93 | ), | ||
94 | detail: None, | ||
95 | documentation: None, | ||
96 | lookup: None, | ||
97 | insert_text: Some( | ||
98 | "return $0;" | ||
99 | ), | ||
100 | insert_text_format: Snippet, | ||
101 | source_range: [55; 55), | 45 | source_range: [55; 55), |
102 | text_edit: None | 46 | kind: Keyword, |
47 | insert_text: "return $0;", | ||
48 | insert_text_format: Snippet | ||
103 | }, | 49 | }, |
104 | CompletionItem { | 50 | CompletionItem { |
105 | completion_kind: Keyword, | ||
106 | label: "while", | 51 | label: "while", |
107 | kind: Some( | ||
108 | Keyword | ||
109 | ), | ||
110 | detail: None, | ||
111 | documentation: None, | ||
112 | lookup: None, | ||
113 | insert_text: Some( | ||
114 | "while $0 {}" | ||
115 | ), | ||
116 | insert_text_format: Snippet, | ||
117 | source_range: [55; 55), | 52 | source_range: [55; 55), |
118 | text_edit: None | 53 | kind: Keyword, |
54 | insert_text: "while $0 {}", | ||
55 | insert_text_format: Snippet | ||
119 | } | 56 | } |
120 | ] | 57 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops2.snap index 42a888e3a..aeedd0e80 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops2.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops2.snap | |||
@@ -1,88 +1,43 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T20:00:15.602646258+00:00" | 2 | created: "2019-02-18T07:29:59.662074625Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | ||
10 | label: "if", | 9 | label: "if", |
11 | kind: Some( | ||
12 | Keyword | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: Some( | ||
18 | "if $0 {}" | ||
19 | ), | ||
20 | insert_text_format: Snippet, | ||
21 | source_range: [60; 60), | 10 | source_range: [60; 60), |
22 | text_edit: None | 11 | kind: Keyword, |
12 | insert_text: "if $0 {}", | ||
13 | insert_text_format: Snippet | ||
23 | }, | 14 | }, |
24 | CompletionItem { | 15 | CompletionItem { |
25 | completion_kind: Keyword, | ||
26 | label: "loop", | 16 | label: "loop", |
27 | kind: Some( | ||
28 | Keyword | ||
29 | ), | ||
30 | detail: None, | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "loop {$0}" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [60; 60), | 17 | source_range: [60; 60), |
38 | text_edit: None | 18 | kind: Keyword, |
19 | insert_text: "loop {$0}", | ||
20 | insert_text_format: Snippet | ||
39 | }, | 21 | }, |
40 | CompletionItem { | 22 | CompletionItem { |
41 | completion_kind: Keyword, | ||
42 | label: "match", | 23 | label: "match", |
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | documentation: None, | ||
48 | lookup: None, | ||
49 | insert_text: Some( | ||
50 | "match $0 {}" | ||
51 | ), | ||
52 | insert_text_format: Snippet, | ||
53 | source_range: [60; 60), | 24 | source_range: [60; 60), |
54 | text_edit: None | 25 | kind: Keyword, |
26 | insert_text: "match $0 {}", | ||
27 | insert_text_format: Snippet | ||
55 | }, | 28 | }, |
56 | CompletionItem { | 29 | CompletionItem { |
57 | completion_kind: Keyword, | ||
58 | label: "return", | 30 | label: "return", |
59 | kind: Some( | ||
60 | Keyword | ||
61 | ), | ||
62 | detail: None, | ||
63 | documentation: None, | ||
64 | lookup: None, | ||
65 | insert_text: Some( | ||
66 | "return $0;" | ||
67 | ), | ||
68 | insert_text_format: Snippet, | ||
69 | source_range: [60; 60), | 31 | source_range: [60; 60), |
70 | text_edit: None | 32 | kind: Keyword, |
33 | insert_text: "return $0;", | ||
34 | insert_text_format: Snippet | ||
71 | }, | 35 | }, |
72 | CompletionItem { | 36 | CompletionItem { |
73 | completion_kind: Keyword, | ||
74 | label: "while", | 37 | label: "while", |
75 | kind: Some( | ||
76 | Keyword | ||
77 | ), | ||
78 | detail: None, | ||
79 | documentation: None, | ||
80 | lookup: None, | ||
81 | insert_text: Some( | ||
82 | "while $0 {}" | ||
83 | ), | ||
84 | insert_text_format: Snippet, | ||
85 | source_range: [60; 60), | 38 | source_range: [60; 60), |
86 | text_edit: None | 39 | kind: Keyword, |
40 | insert_text: "while $0 {}", | ||
41 | insert_text_format: Snippet | ||
87 | } | 42 | } |
88 | ] | 43 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap index 2b5a1a8ea..a22205dad 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap | |||
@@ -1,54 +1,26 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-02-13T19:52:43.734834624Z" | 2 | created: "2019-02-18T07:29:59.774580359Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | 5 | expression: kind_completions |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "Option", | 9 | label: "Option", |
11 | kind: Some( | ||
12 | Struct | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [18; 18), | 10 | source_range: [18; 18), |
20 | text_edit: None | 11 | kind: Struct |
21 | }, | 12 | }, |
22 | CompletionItem { | 13 | CompletionItem { |
23 | completion_kind: Reference, | ||
24 | label: "foo", | 14 | label: "foo", |
25 | kind: Some( | ||
26 | Function | ||
27 | ), | ||
28 | detail: Some( | ||
29 | "fn foo()" | ||
30 | ), | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "foo()$0" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [18; 18), | 15 | source_range: [18; 18), |
38 | text_edit: None | 16 | kind: Function, |
17 | detail: "fn foo()", | ||
18 | insert_text: "foo()$0", | ||
19 | insert_text_format: Snippet | ||
39 | }, | 20 | }, |
40 | CompletionItem { | 21 | CompletionItem { |
41 | completion_kind: Reference, | ||
42 | label: "std", | 22 | label: "std", |
43 | kind: Some( | ||
44 | Module | ||
45 | ), | ||
46 | detail: None, | ||
47 | documentation: None, | ||
48 | lookup: None, | ||
49 | insert_text: None, | ||
50 | insert_text_format: PlainText, | ||
51 | source_range: [18; 18), | 23 | source_range: [18; 18), |
52 | text_edit: None | 24 | kind: Module |
53 | } | 25 | } |
54 | ] | 26 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_use_paths_across_crates.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_use_paths_across_crates.snap index 4b40fcf27..fcbb592e1 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_use_paths_across_crates.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_use_paths_across_crates.snap | |||
@@ -1,22 +1,13 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-02-11T11:53:02.410665254Z" | 2 | created: "2019-02-18T07:29:59.729954589Z" |
3 | creator: [email protected].1 | 3 | creator: [email protected].2 |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | 5 | expression: kind_completions |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "bar", | 9 | label: "bar", |
11 | kind: Some( | ||
12 | Module | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [9; 9), | 10 | source_range: [9; 9), |
20 | text_edit: None | 11 | kind: Module |
21 | } | 12 | } |
22 | ] | 13 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap index b55e24bdc..3c5460319 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap | |||
@@ -1,22 +1,13 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T14:45:00.719911400+00:00" | 2 | created: "2019-02-18T07:29:59.663233766Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | expression: kind_completions | 5 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "Spam", | 9 | label: "Spam", |
11 | kind: Some( | ||
12 | Struct | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [23; 25), | 10 | source_range: [23; 25), |
20 | text_edit: None | 11 | kind: Struct |
21 | } | 12 | } |
22 | ] | 13 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_add_semi_after_return_if_not_a_statement.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_add_semi_after_return_if_not_a_statement.snap index 5e4ff6af8..493684e5b 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_add_semi_after_return_if_not_a_statement.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_add_semi_after_return_if_not_a_statement.snap | |||
@@ -1,88 +1,43 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.920190685+00:00" | 2 | created: "2019-02-18T07:29:59.637726929Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | ||
10 | label: "if", | 9 | label: "if", |
11 | kind: Some( | ||
12 | Keyword | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: Some( | ||
18 | "if $0 {}" | ||
19 | ), | ||
20 | insert_text_format: Snippet, | ||
21 | source_range: [85; 85), | 10 | source_range: [85; 85), |
22 | text_edit: None | 11 | kind: Keyword, |
12 | insert_text: "if $0 {}", | ||
13 | insert_text_format: Snippet | ||
23 | }, | 14 | }, |
24 | CompletionItem { | 15 | CompletionItem { |
25 | completion_kind: Keyword, | ||
26 | label: "loop", | 16 | label: "loop", |
27 | kind: Some( | ||
28 | Keyword | ||
29 | ), | ||
30 | detail: None, | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "loop {$0}" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [85; 85), | 17 | source_range: [85; 85), |
38 | text_edit: None | 18 | kind: Keyword, |
19 | insert_text: "loop {$0}", | ||
20 | insert_text_format: Snippet | ||
39 | }, | 21 | }, |
40 | CompletionItem { | 22 | CompletionItem { |
41 | completion_kind: Keyword, | ||
42 | label: "match", | 23 | label: "match", |
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | documentation: None, | ||
48 | lookup: None, | ||
49 | insert_text: Some( | ||
50 | "match $0 {}" | ||
51 | ), | ||
52 | insert_text_format: Snippet, | ||
53 | source_range: [85; 85), | 24 | source_range: [85; 85), |
54 | text_edit: None | 25 | kind: Keyword, |
26 | insert_text: "match $0 {}", | ||
27 | insert_text_format: Snippet | ||
55 | }, | 28 | }, |
56 | CompletionItem { | 29 | CompletionItem { |
57 | completion_kind: Keyword, | ||
58 | label: "return", | 30 | label: "return", |
59 | kind: Some( | ||
60 | Keyword | ||
61 | ), | ||
62 | detail: None, | ||
63 | documentation: None, | ||
64 | lookup: None, | ||
65 | insert_text: Some( | ||
66 | "return $0" | ||
67 | ), | ||
68 | insert_text_format: Snippet, | ||
69 | source_range: [85; 85), | 31 | source_range: [85; 85), |
70 | text_edit: None | 32 | kind: Keyword, |
33 | insert_text: "return $0", | ||
34 | insert_text_format: Snippet | ||
71 | }, | 35 | }, |
72 | CompletionItem { | 36 | CompletionItem { |
73 | completion_kind: Keyword, | ||
74 | label: "while", | 37 | label: "while", |
75 | kind: Some( | ||
76 | Keyword | ||
77 | ), | ||
78 | detail: None, | ||
79 | documentation: None, | ||
80 | lookup: None, | ||
81 | insert_text: Some( | ||
82 | "while $0 {}" | ||
83 | ), | ||
84 | insert_text_format: Snippet, | ||
85 | source_range: [85; 85), | 38 | source_range: [85; 85), |
86 | text_edit: None | 39 | kind: Keyword, |
40 | insert_text: "while $0 {}", | ||
41 | insert_text_format: Snippet | ||
87 | } | 42 | } |
88 | ] | 43 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap index f4a04ecb3..4e37dbef1 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap | |||
@@ -1,40 +1,20 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.965130040+00:00" | 2 | created: "2019-02-18T07:29:59.812347626Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "frobnicate", | 9 | label: "frobnicate", |
11 | kind: Some( | ||
12 | Function | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "fn frobnicate()" | ||
16 | ), | ||
17 | documentation: None, | ||
18 | lookup: None, | ||
19 | insert_text: None, | ||
20 | insert_text_format: PlainText, | ||
21 | source_range: [35; 39), | 10 | source_range: [35; 39), |
22 | text_edit: None | 11 | kind: Function, |
12 | detail: "fn frobnicate()" | ||
23 | }, | 13 | }, |
24 | CompletionItem { | 14 | CompletionItem { |
25 | completion_kind: Reference, | ||
26 | label: "main", | 15 | label: "main", |
27 | kind: Some( | ||
28 | Function | ||
29 | ), | ||
30 | detail: Some( | ||
31 | "fn main()" | ||
32 | ), | ||
33 | documentation: None, | ||
34 | lookup: None, | ||
35 | insert_text: None, | ||
36 | insert_text_format: PlainText, | ||
37 | source_range: [35; 39), | 16 | source_range: [35; 39), |
38 | text_edit: None | 17 | kind: Function, |
18 | detail: "fn main()" | ||
39 | } | 19 | } |
40 | ] | 20 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap index 18a187c6f..2ba9c82b0 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap | |||
@@ -1,24 +1,14 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-02-17T18:29:14.513213526Z" | 2 | created: "2019-02-18T07:29:59.843178841Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | 5 | expression: kind_completions |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "new", | 9 | label: "new", |
11 | kind: Some( | ||
12 | Method | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "fn new() -> Foo" | ||
16 | ), | ||
17 | documentation: None, | ||
18 | lookup: None, | ||
19 | insert_text: None, | ||
20 | insert_text_format: PlainText, | ||
21 | source_range: [67; 69), | 10 | source_range: [67; 69), |
22 | text_edit: None | 11 | kind: Method, |
12 | detail: "fn new() -> Foo" | ||
23 | } | 13 | } |
24 | ] | 14 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap index 3bc3f5f38..c071ff198 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap | |||
@@ -1,24 +1,14 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T15:38:19.815217100+00:00" | 2 | created: "2019-02-18T07:29:59.808400485Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | expression: kind_completions | 5 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "foo", | 9 | label: "foo", |
11 | kind: Some( | ||
12 | Function | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "pub fn foo()" | ||
16 | ), | ||
17 | documentation: None, | ||
18 | lookup: None, | ||
19 | insert_text: None, | ||
20 | insert_text_format: PlainText, | ||
21 | source_range: [40; 41), | 10 | source_range: [40; 41), |
22 | text_edit: None | 11 | kind: Function, |
12 | detail: "pub fn foo()" | ||
23 | } | 13 | } |
24 | ] | 14 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap index 8f8a3a56c..68bfbcdcd 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap | |||
@@ -1,40 +1,21 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T07:42:59.658375+00:00" | 2 | created: "2019-02-18T07:29:59.810202671Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "bar", | 9 | label: "bar", |
11 | kind: Some( | ||
12 | Binding | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [129; 129), | 10 | source_range: [129; 129), |
20 | text_edit: None | 11 | kind: Binding |
21 | }, | 12 | }, |
22 | CompletionItem { | 13 | CompletionItem { |
23 | completion_kind: Reference, | ||
24 | label: "foo", | 14 | label: "foo", |
25 | kind: Some( | ||
26 | Function | ||
27 | ), | ||
28 | detail: Some( | ||
29 | "fn foo() ->" | ||
30 | ), | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "foo()$0" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [129; 129), | 15 | source_range: [129; 129), |
38 | text_edit: None | 16 | kind: Function, |
17 | detail: "fn foo() ->", | ||
18 | insert_text: "foo()$0", | ||
19 | insert_text_format: Snippet | ||
39 | } | 20 | } |
40 | ] | 21 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant.snap index 8ac58006e..b4a8443a0 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant.snap | |||
@@ -1,48 +1,26 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.937030324+00:00" | 2 | created: "2019-02-18T07:29:59.672144115Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "Bar", | 9 | label: "Bar", |
11 | kind: Some( | ||
12 | EnumVariant | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "(i32)" | ||
16 | ), | ||
17 | documentation: Some( | ||
18 | Documentation( | ||
19 | "Bar Variant with i32" | ||
20 | ) | ||
21 | ), | ||
22 | lookup: None, | ||
23 | insert_text: None, | ||
24 | insert_text_format: PlainText, | ||
25 | source_range: [116; 116), | 10 | source_range: [116; 116), |
26 | text_edit: None | 11 | kind: EnumVariant, |
12 | detail: "(i32)", | ||
13 | documentation: Documentation( | ||
14 | "Bar Variant with i32" | ||
15 | ) | ||
27 | }, | 16 | }, |
28 | CompletionItem { | 17 | CompletionItem { |
29 | completion_kind: Reference, | ||
30 | label: "Foo", | 18 | label: "Foo", |
31 | kind: Some( | ||
32 | EnumVariant | ||
33 | ), | ||
34 | detail: Some( | ||
35 | "()" | ||
36 | ), | ||
37 | documentation: Some( | ||
38 | Documentation( | ||
39 | "Foo Variant" | ||
40 | ) | ||
41 | ), | ||
42 | lookup: None, | ||
43 | insert_text: None, | ||
44 | insert_text_format: PlainText, | ||
45 | source_range: [116; 116), | 19 | source_range: [116; 116), |
46 | text_edit: None | 20 | kind: EnumVariant, |
21 | detail: "()", | ||
22 | documentation: Documentation( | ||
23 | "Foo Variant" | ||
24 | ) | ||
47 | } | 25 | } |
48 | ] | 26 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant_with_details.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant_with_details.snap index 9fd2d81ec..8f6defc4f 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant_with_details.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant_with_details.snap | |||
@@ -1,64 +1,32 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.938973454+00:00" | 2 | created: "2019-02-18T07:29:59.686329490Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "Bar", | 9 | label: "Bar", |
11 | kind: Some( | ||
12 | EnumVariant | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "(i32, u32)" | ||
16 | ), | ||
17 | documentation: Some( | ||
18 | Documentation( | ||
19 | "Bar Variant with i32 and u32" | ||
20 | ) | ||
21 | ), | ||
22 | lookup: None, | ||
23 | insert_text: None, | ||
24 | insert_text_format: PlainText, | ||
25 | source_range: [180; 180), | 10 | source_range: [180; 180), |
26 | text_edit: None | 11 | kind: EnumVariant, |
12 | detail: "(i32, u32)", | ||
13 | documentation: Documentation( | ||
14 | "Bar Variant with i32 and u32" | ||
15 | ) | ||
27 | }, | 16 | }, |
28 | CompletionItem { | 17 | CompletionItem { |
29 | completion_kind: Reference, | ||
30 | label: "Foo", | 18 | label: "Foo", |
31 | kind: Some( | ||
32 | EnumVariant | ||
33 | ), | ||
34 | detail: Some( | ||
35 | "()" | ||
36 | ), | ||
37 | documentation: Some( | ||
38 | Documentation( | ||
39 | "Foo Variant (empty)" | ||
40 | ) | ||
41 | ), | ||
42 | lookup: None, | ||
43 | insert_text: None, | ||
44 | insert_text_format: PlainText, | ||
45 | source_range: [180; 180), | 19 | source_range: [180; 180), |
46 | text_edit: None | 20 | kind: EnumVariant, |
21 | detail: "()", | ||
22 | documentation: Documentation( | ||
23 | "Foo Variant (empty)" | ||
24 | ) | ||
47 | }, | 25 | }, |
48 | CompletionItem { | 26 | CompletionItem { |
49 | completion_kind: Reference, | ||
50 | label: "S", | 27 | label: "S", |
51 | kind: Some( | ||
52 | EnumVariant | ||
53 | ), | ||
54 | detail: Some( | ||
55 | "(S)" | ||
56 | ), | ||
57 | documentation: None, | ||
58 | lookup: None, | ||
59 | insert_text: None, | ||
60 | insert_text_format: PlainText, | ||
61 | source_range: [180; 180), | 28 | source_range: [180; 180), |
62 | text_edit: None | 29 | kind: EnumVariant, |
30 | detail: "(S)" | ||
63 | } | 31 | } |
64 | ] | 32 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap index d0e3a6188..2a2959fd2 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap | |||
@@ -1,22 +1,13 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-02-04T21:08:32.615556587+00:00" | 2 | created: "2019-02-18T07:29:59.763042807Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "other_crate", | 9 | label: "other_crate", |
11 | kind: Some( | ||
12 | Module | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [4; 4), | 10 | source_range: [4; 4), |
20 | text_edit: None | 11 | kind: Module |
21 | } | 12 | } |
22 | ] | 13 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap index 71cb55a5b..5e1a876da 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap | |||
@@ -1,40 +1,21 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-02-01T22:20:40.580128393+00:00" | 2 | created: "2019-02-18T07:29:59.765665697Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "T", | 9 | label: "T", |
11 | kind: Some( | ||
12 | TypeParam | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [44; 44), | 10 | source_range: [44; 44), |
20 | text_edit: None | 11 | kind: TypeParam |
21 | }, | 12 | }, |
22 | CompletionItem { | 13 | CompletionItem { |
23 | completion_kind: Reference, | ||
24 | label: "quux", | 14 | label: "quux", |
25 | kind: Some( | ||
26 | Function | ||
27 | ), | ||
28 | detail: Some( | ||
29 | "fn quux<T>()" | ||
30 | ), | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "quux()$0" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [44; 44), | 15 | source_range: [44; 44), |
38 | text_edit: None | 16 | kind: Function, |
17 | detail: "fn quux<T>()", | ||
18 | insert_text: "quux()$0", | ||
19 | insert_text_format: Snippet | ||
39 | } | 20 | } |
40 | ] | 21 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap index a35c0cd13..b0c9bff03 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap | |||
@@ -1,36 +1,18 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-02-01T22:23:21.508620224+00:00" | 2 | created: "2019-02-18T07:29:59.768275744Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "T", | 9 | label: "T", |
11 | kind: Some( | ||
12 | TypeParam | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [46; 46), | 10 | source_range: [46; 46), |
20 | text_edit: None | 11 | kind: TypeParam |
21 | }, | 12 | }, |
22 | CompletionItem { | 13 | CompletionItem { |
23 | completion_kind: Reference, | ||
24 | label: "X", | 14 | label: "X", |
25 | kind: Some( | ||
26 | Struct | ||
27 | ), | ||
28 | detail: None, | ||
29 | documentation: None, | ||
30 | lookup: None, | ||
31 | insert_text: None, | ||
32 | insert_text_format: PlainText, | ||
33 | source_range: [46; 46), | 15 | source_range: [46; 46), |
34 | text_edit: None | 16 | kind: Struct |
35 | } | 17 | } |
36 | ] | 18 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap index 339df3c84..8ef0a4b7a 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap | |||
@@ -1,44 +1,24 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.965550827+00:00" | 2 | created: "2019-02-18T07:29:59.808403924Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "main", | 9 | label: "main", |
11 | kind: Some( | ||
12 | Function | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "fn main()" | ||
16 | ), | ||
17 | documentation: None, | ||
18 | lookup: None, | ||
19 | insert_text: Some( | ||
20 | "main()$0" | ||
21 | ), | ||
22 | insert_text_format: Snippet, | ||
23 | source_range: [53; 56), | 10 | source_range: [53; 56), |
24 | text_edit: None | 11 | kind: Function, |
12 | detail: "fn main()", | ||
13 | insert_text: "main()$0", | ||
14 | insert_text_format: Snippet | ||
25 | }, | 15 | }, |
26 | CompletionItem { | 16 | CompletionItem { |
27 | completion_kind: Reference, | ||
28 | label: "no_args", | 17 | label: "no_args", |
29 | kind: Some( | ||
30 | Function | ||
31 | ), | ||
32 | detail: Some( | ||
33 | "fn no_args()" | ||
34 | ), | ||
35 | documentation: None, | ||
36 | lookup: None, | ||
37 | insert_text: Some( | ||
38 | "no_args()$0" | ||
39 | ), | ||
40 | insert_text_format: Snippet, | ||
41 | source_range: [53; 56), | 18 | source_range: [53; 56), |
42 | text_edit: None | 19 | kind: Function, |
20 | detail: "fn no_args()", | ||
21 | insert_text: "no_args()$0", | ||
22 | insert_text_format: Snippet | ||
43 | } | 23 | } |
44 | ] | 24 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap index c524f3587..32730639e 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap | |||
@@ -1,44 +1,24 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T15:38:19.996733+00:00" | 2 | created: "2019-02-18T07:29:59.843178843Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | expression: kind_completions | 5 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "main", | 9 | label: "main", |
11 | kind: Some( | ||
12 | Function | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "fn main()" | ||
16 | ), | ||
17 | documentation: None, | ||
18 | lookup: None, | ||
19 | insert_text: Some( | ||
20 | "main()$0" | ||
21 | ), | ||
22 | insert_text_format: Snippet, | ||
23 | source_range: [72; 77), | 10 | source_range: [72; 77), |
24 | text_edit: None | 11 | kind: Function, |
12 | detail: "fn main()", | ||
13 | insert_text: "main()$0", | ||
14 | insert_text_format: Snippet | ||
25 | }, | 15 | }, |
26 | CompletionItem { | 16 | CompletionItem { |
27 | completion_kind: Reference, | ||
28 | label: "with_args", | 17 | label: "with_args", |
29 | kind: Some( | ||
30 | Function | ||
31 | ), | ||
32 | detail: Some( | ||
33 | "fn with_args(x: i32, y: String)" | ||
34 | ), | ||
35 | documentation: None, | ||
36 | lookup: None, | ||
37 | insert_text: Some( | ||
38 | "with_args($0)" | ||
39 | ), | ||
40 | insert_text_format: Snippet, | ||
41 | source_range: [72; 77), | 18 | source_range: [72; 77), |
42 | text_edit: None | 19 | kind: Function, |
20 | detail: "fn with_args(x: i32, y: String)", | ||
21 | insert_text: "with_args($0)", | ||
22 | insert_text_format: Snippet | ||
43 | } | 23 | } |
44 | ] | 24 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap index 92068e50a..99f21b258 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap | |||
@@ -1,26 +1,16 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T13:19:23.525922020+00:00" | 2 | created: "2019-02-18T07:29:59.877573951Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "foo", | 9 | label: "foo", |
11 | kind: Some( | ||
12 | Method | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "fn foo(&self)" | ||
16 | ), | ||
17 | documentation: None, | ||
18 | lookup: None, | ||
19 | insert_text: Some( | ||
20 | "foo()$0" | ||
21 | ), | ||
22 | insert_text_format: Snippet, | ||
23 | source_range: [139; 140), | 10 | source_range: [139; 140), |
24 | text_edit: None | 11 | kind: Method, |
12 | detail: "fn foo(&self)", | ||
13 | insert_text: "foo()$0", | ||
14 | insert_text_format: Snippet | ||
25 | } | 15 | } |
26 | ] | 16 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function1.snap index 874c41a02..022e3f6e9 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function1.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function1.snap | |||
@@ -1,88 +1,43 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.913826978+00:00" | 2 | created: "2019-02-18T07:29:59.639066512Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | ||
10 | label: "if", | 9 | label: "if", |
11 | kind: Some( | ||
12 | Keyword | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: Some( | ||
18 | "if $0 {}" | ||
19 | ), | ||
20 | insert_text_format: Snippet, | ||
21 | source_range: [41; 41), | 10 | source_range: [41; 41), |
22 | text_edit: None | 11 | kind: Keyword, |
12 | insert_text: "if $0 {}", | ||
13 | insert_text_format: Snippet | ||
23 | }, | 14 | }, |
24 | CompletionItem { | 15 | CompletionItem { |
25 | completion_kind: Keyword, | ||
26 | label: "loop", | 16 | label: "loop", |
27 | kind: Some( | ||
28 | Keyword | ||
29 | ), | ||
30 | detail: None, | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "loop {$0}" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [41; 41), | 17 | source_range: [41; 41), |
38 | text_edit: None | 18 | kind: Keyword, |
19 | insert_text: "loop {$0}", | ||
20 | insert_text_format: Snippet | ||
39 | }, | 21 | }, |
40 | CompletionItem { | 22 | CompletionItem { |
41 | completion_kind: Keyword, | ||
42 | label: "match", | 23 | label: "match", |
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | documentation: None, | ||
48 | lookup: None, | ||
49 | insert_text: Some( | ||
50 | "match $0 {}" | ||
51 | ), | ||
52 | insert_text_format: Snippet, | ||
53 | source_range: [41; 41), | 24 | source_range: [41; 41), |
54 | text_edit: None | 25 | kind: Keyword, |
26 | insert_text: "match $0 {}", | ||
27 | insert_text_format: Snippet | ||
55 | }, | 28 | }, |
56 | CompletionItem { | 29 | CompletionItem { |
57 | completion_kind: Keyword, | ||
58 | label: "return", | 30 | label: "return", |
59 | kind: Some( | ||
60 | Keyword | ||
61 | ), | ||
62 | detail: None, | ||
63 | documentation: None, | ||
64 | lookup: None, | ||
65 | insert_text: Some( | ||
66 | "return;" | ||
67 | ), | ||
68 | insert_text_format: Snippet, | ||
69 | source_range: [41; 41), | 31 | source_range: [41; 41), |
70 | text_edit: None | 32 | kind: Keyword, |
33 | insert_text: "return;", | ||
34 | insert_text_format: Snippet | ||
71 | }, | 35 | }, |
72 | CompletionItem { | 36 | CompletionItem { |
73 | completion_kind: Keyword, | ||
74 | label: "while", | 37 | label: "while", |
75 | kind: Some( | ||
76 | Keyword | ||
77 | ), | ||
78 | detail: None, | ||
79 | documentation: None, | ||
80 | lookup: None, | ||
81 | insert_text: Some( | ||
82 | "while $0 {}" | ||
83 | ), | ||
84 | insert_text_format: Snippet, | ||
85 | source_range: [41; 41), | 38 | source_range: [41; 41), |
86 | text_edit: None | 39 | kind: Keyword, |
40 | insert_text: "while $0 {}", | ||
41 | insert_text_format: Snippet | ||
87 | } | 42 | } |
88 | ] | 43 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap index 0eec578be..fd63c1678 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap | |||
@@ -1,120 +1,57 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.914744437+00:00" | 2 | created: "2019-02-18T07:29:59.630760038Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | ||
10 | label: "else", | 9 | label: "else", |
11 | kind: Some( | ||
12 | Keyword | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: Some( | ||
18 | "else {$0}" | ||
19 | ), | ||
20 | insert_text_format: Snippet, | ||
21 | source_range: [92; 92), | 10 | source_range: [92; 92), |
22 | text_edit: None | 11 | kind: Keyword, |
12 | insert_text: "else {$0}", | ||
13 | insert_text_format: Snippet | ||
23 | }, | 14 | }, |
24 | CompletionItem { | 15 | CompletionItem { |
25 | completion_kind: Keyword, | ||
26 | label: "else if", | 16 | label: "else if", |
27 | kind: Some( | ||
28 | Keyword | ||
29 | ), | ||
30 | detail: None, | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "else if $0 {}" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [92; 92), | 17 | source_range: [92; 92), |
38 | text_edit: None | 18 | kind: Keyword, |
19 | insert_text: "else if $0 {}", | ||
20 | insert_text_format: Snippet | ||
39 | }, | 21 | }, |
40 | CompletionItem { | 22 | CompletionItem { |
41 | completion_kind: Keyword, | ||
42 | label: "if", | 23 | label: "if", |
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | documentation: None, | ||
48 | lookup: None, | ||
49 | insert_text: Some( | ||
50 | "if $0 {}" | ||
51 | ), | ||
52 | insert_text_format: Snippet, | ||
53 | source_range: [92; 92), | 24 | source_range: [92; 92), |
54 | text_edit: None | 25 | kind: Keyword, |
26 | insert_text: "if $0 {}", | ||
27 | insert_text_format: Snippet | ||
55 | }, | 28 | }, |
56 | CompletionItem { | 29 | CompletionItem { |
57 | completion_kind: Keyword, | ||
58 | label: "loop", | 30 | label: "loop", |
59 | kind: Some( | ||
60 | Keyword | ||
61 | ), | ||
62 | detail: None, | ||
63 | documentation: None, | ||
64 | lookup: None, | ||
65 | insert_text: Some( | ||
66 | "loop {$0}" | ||
67 | ), | ||
68 | insert_text_format: Snippet, | ||
69 | source_range: [92; 92), | 31 | source_range: [92; 92), |
70 | text_edit: None | 32 | kind: Keyword, |
33 | insert_text: "loop {$0}", | ||
34 | insert_text_format: Snippet | ||
71 | }, | 35 | }, |
72 | CompletionItem { | 36 | CompletionItem { |
73 | completion_kind: Keyword, | ||
74 | label: "match", | 37 | label: "match", |
75 | kind: Some( | ||
76 | Keyword | ||
77 | ), | ||
78 | detail: None, | ||
79 | documentation: None, | ||
80 | lookup: None, | ||
81 | insert_text: Some( | ||
82 | "match $0 {}" | ||
83 | ), | ||
84 | insert_text_format: Snippet, | ||
85 | source_range: [92; 92), | 38 | source_range: [92; 92), |
86 | text_edit: None | 39 | kind: Keyword, |
40 | insert_text: "match $0 {}", | ||
41 | insert_text_format: Snippet | ||
87 | }, | 42 | }, |
88 | CompletionItem { | 43 | CompletionItem { |
89 | completion_kind: Keyword, | ||
90 | label: "return", | 44 | label: "return", |
91 | kind: Some( | ||
92 | Keyword | ||
93 | ), | ||
94 | detail: None, | ||
95 | documentation: None, | ||
96 | lookup: None, | ||
97 | insert_text: Some( | ||
98 | "return;" | ||
99 | ), | ||
100 | insert_text_format: Snippet, | ||
101 | source_range: [92; 92), | 45 | source_range: [92; 92), |
102 | text_edit: None | 46 | kind: Keyword, |
47 | insert_text: "return;", | ||
48 | insert_text_format: Snippet | ||
103 | }, | 49 | }, |
104 | CompletionItem { | 50 | CompletionItem { |
105 | completion_kind: Keyword, | ||
106 | label: "while", | 51 | label: "while", |
107 | kind: Some( | ||
108 | Keyword | ||
109 | ), | ||
110 | detail: None, | ||
111 | documentation: None, | ||
112 | lookup: None, | ||
113 | insert_text: Some( | ||
114 | "while $0 {}" | ||
115 | ), | ||
116 | insert_text_format: Snippet, | ||
117 | source_range: [92; 92), | 52 | source_range: [92; 92), |
118 | text_edit: None | 53 | kind: Keyword, |
54 | insert_text: "while $0 {}", | ||
55 | insert_text_format: Snippet | ||
119 | } | 56 | } |
120 | ] | 57 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function3.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function3.snap index 4b99f15e1..90f769078 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function3.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function3.snap | |||
@@ -1,88 +1,43 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.927994050+00:00" | 2 | created: "2019-02-18T07:29:59.659527166Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | ||
10 | label: "if", | 9 | label: "if", |
11 | kind: Some( | ||
12 | Keyword | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: Some( | ||
18 | "if $0 {}" | ||
19 | ), | ||
20 | insert_text_format: Snippet, | ||
21 | source_range: [48; 48), | 10 | source_range: [48; 48), |
22 | text_edit: None | 11 | kind: Keyword, |
12 | insert_text: "if $0 {}", | ||
13 | insert_text_format: Snippet | ||
23 | }, | 14 | }, |
24 | CompletionItem { | 15 | CompletionItem { |
25 | completion_kind: Keyword, | ||
26 | label: "loop", | 16 | label: "loop", |
27 | kind: Some( | ||
28 | Keyword | ||
29 | ), | ||
30 | detail: None, | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "loop {$0}" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [48; 48), | 17 | source_range: [48; 48), |
38 | text_edit: None | 18 | kind: Keyword, |
19 | insert_text: "loop {$0}", | ||
20 | insert_text_format: Snippet | ||
39 | }, | 21 | }, |
40 | CompletionItem { | 22 | CompletionItem { |
41 | completion_kind: Keyword, | ||
42 | label: "match", | 23 | label: "match", |
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | documentation: None, | ||
48 | lookup: None, | ||
49 | insert_text: Some( | ||
50 | "match $0 {}" | ||
51 | ), | ||
52 | insert_text_format: Snippet, | ||
53 | source_range: [48; 48), | 24 | source_range: [48; 48), |
54 | text_edit: None | 25 | kind: Keyword, |
26 | insert_text: "match $0 {}", | ||
27 | insert_text_format: Snippet | ||
55 | }, | 28 | }, |
56 | CompletionItem { | 29 | CompletionItem { |
57 | completion_kind: Keyword, | ||
58 | label: "return", | 30 | label: "return", |
59 | kind: Some( | ||
60 | Keyword | ||
61 | ), | ||
62 | detail: None, | ||
63 | documentation: None, | ||
64 | lookup: None, | ||
65 | insert_text: Some( | ||
66 | "return $0;" | ||
67 | ), | ||
68 | insert_text_format: Snippet, | ||
69 | source_range: [48; 48), | 31 | source_range: [48; 48), |
70 | text_edit: None | 32 | kind: Keyword, |
33 | insert_text: "return $0;", | ||
34 | insert_text_format: Snippet | ||
71 | }, | 35 | }, |
72 | CompletionItem { | 36 | CompletionItem { |
73 | completion_kind: Keyword, | ||
74 | label: "while", | 37 | label: "while", |
75 | kind: Some( | ||
76 | Keyword | ||
77 | ), | ||
78 | detail: None, | ||
79 | documentation: None, | ||
80 | lookup: None, | ||
81 | insert_text: Some( | ||
82 | "while $0 {}" | ||
83 | ), | ||
84 | insert_text_format: Snippet, | ||
85 | source_range: [48; 48), | 38 | source_range: [48; 48), |
86 | text_edit: None | 39 | kind: Keyword, |
40 | insert_text: "while $0 {}", | ||
41 | insert_text_format: Snippet | ||
87 | } | 42 | } |
88 | ] | 43 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function4.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function4.snap index f8587f147..5e7ec108c 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function4.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function4.snap | |||
@@ -1,88 +1,43 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T20:00:15.604538211+00:00" | 2 | created: "2019-02-18T07:29:59.696757543Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | ||
10 | label: "if", | 9 | label: "if", |
11 | kind: Some( | ||
12 | Keyword | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: Some( | ||
18 | "if $0 {}" | ||
19 | ), | ||
20 | insert_text_format: Snippet, | ||
21 | source_range: [41; 41), | 10 | source_range: [41; 41), |
22 | text_edit: None | 11 | kind: Keyword, |
12 | insert_text: "if $0 {}", | ||
13 | insert_text_format: Snippet | ||
23 | }, | 14 | }, |
24 | CompletionItem { | 15 | CompletionItem { |
25 | completion_kind: Keyword, | ||
26 | label: "loop", | 16 | label: "loop", |
27 | kind: Some( | ||
28 | Keyword | ||
29 | ), | ||
30 | detail: None, | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "loop {$0}" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [41; 41), | 17 | source_range: [41; 41), |
38 | text_edit: None | 18 | kind: Keyword, |
19 | insert_text: "loop {$0}", | ||
20 | insert_text_format: Snippet | ||
39 | }, | 21 | }, |
40 | CompletionItem { | 22 | CompletionItem { |
41 | completion_kind: Keyword, | ||
42 | label: "match", | 23 | label: "match", |
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | documentation: None, | ||
48 | lookup: None, | ||
49 | insert_text: Some( | ||
50 | "match $0 {}" | ||
51 | ), | ||
52 | insert_text_format: Snippet, | ||
53 | source_range: [41; 41), | 24 | source_range: [41; 41), |
54 | text_edit: None | 25 | kind: Keyword, |
26 | insert_text: "match $0 {}", | ||
27 | insert_text_format: Snippet | ||
55 | }, | 28 | }, |
56 | CompletionItem { | 29 | CompletionItem { |
57 | completion_kind: Keyword, | ||
58 | label: "return", | 30 | label: "return", |
59 | kind: Some( | ||
60 | Keyword | ||
61 | ), | ||
62 | detail: None, | ||
63 | documentation: None, | ||
64 | lookup: None, | ||
65 | insert_text: Some( | ||
66 | "return;" | ||
67 | ), | ||
68 | insert_text_format: Snippet, | ||
69 | source_range: [41; 41), | 31 | source_range: [41; 41), |
70 | text_edit: None | 32 | kind: Keyword, |
33 | insert_text: "return;", | ||
34 | insert_text_format: Snippet | ||
71 | }, | 35 | }, |
72 | CompletionItem { | 36 | CompletionItem { |
73 | completion_kind: Keyword, | ||
74 | label: "while", | 37 | label: "while", |
75 | kind: Some( | ||
76 | Keyword | ||
77 | ), | ||
78 | detail: None, | ||
79 | documentation: None, | ||
80 | lookup: None, | ||
81 | insert_text: Some( | ||
82 | "while $0 {}" | ||
83 | ), | ||
84 | insert_text_format: Snippet, | ||
85 | source_range: [41; 41), | 38 | source_range: [41; 41), |
86 | text_edit: None | 39 | kind: Keyword, |
40 | insert_text: "while $0 {}", | ||
41 | insert_text_format: Snippet | ||
87 | } | 42 | } |
88 | ] | 43 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap index 9dd5b2254..f969a843b 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap | |||
@@ -1,54 +1,27 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.196887+00:00" | 2 | created: "2019-02-18T07:29:59.633925638Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | ||
10 | label: "crate", | 9 | label: "crate", |
11 | kind: Some( | ||
12 | Keyword | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: Some( | ||
18 | "crate::" | ||
19 | ), | ||
20 | insert_text_format: PlainText, | ||
21 | source_range: [17; 17), | 10 | source_range: [17; 17), |
22 | text_edit: None | 11 | kind: Keyword, |
12 | insert_text: "crate::", | ||
13 | insert_text_format: PlainText | ||
23 | }, | 14 | }, |
24 | CompletionItem { | 15 | CompletionItem { |
25 | completion_kind: Keyword, | ||
26 | label: "self", | 16 | label: "self", |
27 | kind: Some( | ||
28 | Keyword | ||
29 | ), | ||
30 | detail: None, | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: None, | ||
34 | insert_text_format: PlainText, | ||
35 | source_range: [17; 17), | 17 | source_range: [17; 17), |
36 | text_edit: None | 18 | kind: Keyword |
37 | }, | 19 | }, |
38 | CompletionItem { | 20 | CompletionItem { |
39 | completion_kind: Keyword, | ||
40 | label: "super", | 21 | label: "super", |
41 | kind: Some( | ||
42 | Keyword | ||
43 | ), | ||
44 | detail: None, | ||
45 | documentation: None, | ||
46 | lookup: None, | ||
47 | insert_text: Some( | ||
48 | "super::" | ||
49 | ), | ||
50 | insert_text_format: PlainText, | ||
51 | source_range: [17; 17), | 22 | source_range: [17; 17), |
52 | text_edit: None | 23 | kind: Keyword, |
24 | insert_text: "super::", | ||
25 | insert_text_format: PlainText | ||
53 | } | 26 | } |
54 | ] | 27 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap index 92224becc..bbbdeae8f 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap | |||
@@ -1,38 +1,20 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T14:45:00.698966900+00:00" | 2 | created: "2019-02-18T07:29:59.658885169Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | expression: kind_completions | 5 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | ||
10 | label: "self", | 9 | label: "self", |
11 | kind: Some( | ||
12 | Keyword | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [20; 20), | 10 | source_range: [20; 20), |
20 | text_edit: None | 11 | kind: Keyword |
21 | }, | 12 | }, |
22 | CompletionItem { | 13 | CompletionItem { |
23 | completion_kind: Keyword, | ||
24 | label: "super", | 14 | label: "super", |
25 | kind: Some( | ||
26 | Keyword | ||
27 | ), | ||
28 | detail: None, | ||
29 | documentation: None, | ||
30 | lookup: None, | ||
31 | insert_text: Some( | ||
32 | "super::" | ||
33 | ), | ||
34 | insert_text_format: PlainText, | ||
35 | source_range: [20; 20), | 15 | source_range: [20; 20), |
36 | text_edit: None | 16 | kind: Keyword, |
17 | insert_text: "super::", | ||
18 | insert_text_format: PlainText | ||
37 | } | 19 | } |
38 | ] | 20 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap index 965a0fbed..84475e0d8 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap | |||
@@ -1,38 +1,20 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.303390+00:00" | 2 | created: "2019-02-18T07:29:59.688856977Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | ||
10 | label: "self", | 9 | label: "self", |
11 | kind: Some( | ||
12 | Keyword | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [24; 24), | 10 | source_range: [24; 24), |
20 | text_edit: None | 11 | kind: Keyword |
21 | }, | 12 | }, |
22 | CompletionItem { | 13 | CompletionItem { |
23 | completion_kind: Keyword, | ||
24 | label: "super", | 14 | label: "super", |
25 | kind: Some( | ||
26 | Keyword | ||
27 | ), | ||
28 | detail: None, | ||
29 | documentation: None, | ||
30 | lookup: None, | ||
31 | insert_text: Some( | ||
32 | "super::" | ||
33 | ), | ||
34 | insert_text_format: PlainText, | ||
35 | source_range: [24; 24), | 15 | source_range: [24; 24), |
36 | text_edit: None | 16 | kind: Keyword, |
17 | insert_text: "super::", | ||
18 | insert_text_format: PlainText | ||
37 | } | 19 | } |
38 | ] | 20 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi1.snap index 3c27e079f..5d12dd41b 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi1.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi1.snap | |||
@@ -1,88 +1,43 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.918882346+00:00" | 2 | created: "2019-02-18T07:29:59.638715790Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | ||
10 | label: "if", | 9 | label: "if", |
11 | kind: Some( | ||
12 | Keyword | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: Some( | ||
18 | "if $0 {}" | ||
19 | ), | ||
20 | insert_text_format: Snippet, | ||
21 | source_range: [83; 83), | 10 | source_range: [83; 83), |
22 | text_edit: None | 11 | kind: Keyword, |
12 | insert_text: "if $0 {}", | ||
13 | insert_text_format: Snippet | ||
23 | }, | 14 | }, |
24 | CompletionItem { | 15 | CompletionItem { |
25 | completion_kind: Keyword, | ||
26 | label: "loop", | 16 | label: "loop", |
27 | kind: Some( | ||
28 | Keyword | ||
29 | ), | ||
30 | detail: None, | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "loop {$0}" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [83; 83), | 17 | source_range: [83; 83), |
38 | text_edit: None | 18 | kind: Keyword, |
19 | insert_text: "loop {$0}", | ||
20 | insert_text_format: Snippet | ||
39 | }, | 21 | }, |
40 | CompletionItem { | 22 | CompletionItem { |
41 | completion_kind: Keyword, | ||
42 | label: "match", | 23 | label: "match", |
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | documentation: None, | ||
48 | lookup: None, | ||
49 | insert_text: Some( | ||
50 | "match $0 {}" | ||
51 | ), | ||
52 | insert_text_format: Snippet, | ||
53 | source_range: [83; 83), | 24 | source_range: [83; 83), |
54 | text_edit: None | 25 | kind: Keyword, |
26 | insert_text: "match $0 {}", | ||
27 | insert_text_format: Snippet | ||
55 | }, | 28 | }, |
56 | CompletionItem { | 29 | CompletionItem { |
57 | completion_kind: Keyword, | ||
58 | label: "return", | 30 | label: "return", |
59 | kind: Some( | ||
60 | Keyword | ||
61 | ), | ||
62 | detail: None, | ||
63 | documentation: None, | ||
64 | lookup: None, | ||
65 | insert_text: Some( | ||
66 | "return $0;" | ||
67 | ), | ||
68 | insert_text_format: Snippet, | ||
69 | source_range: [83; 83), | 31 | source_range: [83; 83), |
70 | text_edit: None | 32 | kind: Keyword, |
33 | insert_text: "return $0;", | ||
34 | insert_text_format: Snippet | ||
71 | }, | 35 | }, |
72 | CompletionItem { | 36 | CompletionItem { |
73 | completion_kind: Keyword, | ||
74 | label: "while", | 37 | label: "while", |
75 | kind: Some( | ||
76 | Keyword | ||
77 | ), | ||
78 | detail: None, | ||
79 | documentation: None, | ||
80 | lookup: None, | ||
81 | insert_text: Some( | ||
82 | "while $0 {}" | ||
83 | ), | ||
84 | insert_text_format: Snippet, | ||
85 | source_range: [83; 83), | 38 | source_range: [83; 83), |
86 | text_edit: None | 39 | kind: Keyword, |
40 | insert_text: "while $0 {}", | ||
41 | insert_text_format: Snippet | ||
87 | } | 42 | } |
88 | ] | 43 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi2.snap index d1be8c6e7..5866369b6 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi2.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi2.snap | |||
@@ -1,88 +1,43 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T20:00:15.604282112+00:00" | 2 | created: "2019-02-18T07:29:59.661936290Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | ||
10 | label: "if", | 9 | label: "if", |
11 | kind: Some( | ||
12 | Keyword | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: Some( | ||
18 | "if $0 {}" | ||
19 | ), | ||
20 | insert_text_format: Snippet, | ||
21 | source_range: [83; 83), | 10 | source_range: [83; 83), |
22 | text_edit: None | 11 | kind: Keyword, |
12 | insert_text: "if $0 {}", | ||
13 | insert_text_format: Snippet | ||
23 | }, | 14 | }, |
24 | CompletionItem { | 15 | CompletionItem { |
25 | completion_kind: Keyword, | ||
26 | label: "loop", | 16 | label: "loop", |
27 | kind: Some( | ||
28 | Keyword | ||
29 | ), | ||
30 | detail: None, | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "loop {$0}" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [83; 83), | 17 | source_range: [83; 83), |
38 | text_edit: None | 18 | kind: Keyword, |
19 | insert_text: "loop {$0}", | ||
20 | insert_text_format: Snippet | ||
39 | }, | 21 | }, |
40 | CompletionItem { | 22 | CompletionItem { |
41 | completion_kind: Keyword, | ||
42 | label: "match", | 23 | label: "match", |
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | documentation: None, | ||
48 | lookup: None, | ||
49 | insert_text: Some( | ||
50 | "match $0 {}" | ||
51 | ), | ||
52 | insert_text_format: Snippet, | ||
53 | source_range: [83; 83), | 24 | source_range: [83; 83), |
54 | text_edit: None | 25 | kind: Keyword, |
26 | insert_text: "match $0 {}", | ||
27 | insert_text_format: Snippet | ||
55 | }, | 28 | }, |
56 | CompletionItem { | 29 | CompletionItem { |
57 | completion_kind: Keyword, | ||
58 | label: "return", | 30 | label: "return", |
59 | kind: Some( | ||
60 | Keyword | ||
61 | ), | ||
62 | detail: None, | ||
63 | documentation: None, | ||
64 | lookup: None, | ||
65 | insert_text: Some( | ||
66 | "return $0;" | ||
67 | ), | ||
68 | insert_text_format: Snippet, | ||
69 | source_range: [83; 83), | 31 | source_range: [83; 83), |
70 | text_edit: None | 32 | kind: Keyword, |
33 | insert_text: "return $0;", | ||
34 | insert_text_format: Snippet | ||
71 | }, | 35 | }, |
72 | CompletionItem { | 36 | CompletionItem { |
73 | completion_kind: Keyword, | ||
74 | label: "while", | 37 | label: "while", |
75 | kind: Some( | ||
76 | Keyword | ||
77 | ), | ||
78 | detail: None, | ||
79 | documentation: None, | ||
80 | lookup: None, | ||
81 | insert_text: Some( | ||
82 | "while $0 {}" | ||
83 | ), | ||
84 | insert_text_format: Snippet, | ||
85 | source_range: [83; 83), | 38 | source_range: [83; 83), |
86 | text_edit: None | 39 | kind: Keyword, |
40 | insert_text: "while $0 {}", | ||
41 | insert_text_format: Snippet | ||
87 | } | 42 | } |
88 | ] | 43 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_attr_filtering.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_attr_filtering.snap index 46f9fa971..4753eece7 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_attr_filtering.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_attr_filtering.snap | |||
@@ -1,26 +1,16 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-02-12T18:32:09.428929418Z" | 2 | created: "2019-02-18T07:29:59.598946710Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | 5 | expression: kind_completions |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "the_method", | 9 | label: "the_method", |
11 | kind: Some( | ||
12 | Method | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "fn the_method(&self)" | ||
16 | ), | ||
17 | documentation: None, | ||
18 | lookup: None, | ||
19 | insert_text: Some( | ||
20 | "the_method()$0" | ||
21 | ), | ||
22 | insert_text_format: Snippet, | ||
23 | source_range: [249; 249), | 10 | source_range: [249; 249), |
24 | text_edit: None | 11 | kind: Method, |
12 | detail: "fn the_method(&self)", | ||
13 | insert_text: "the_method()$0", | ||
14 | insert_text_format: Snippet | ||
25 | } | 15 | } |
26 | ] | 16 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap index 10fe59248..6cc8ab26c 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap | |||
@@ -1,26 +1,16 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T13:19:23.501258181+00:00" | 2 | created: "2019-02-18T07:29:59.598948318Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "the_method", | 9 | label: "the_method", |
11 | kind: Some( | ||
12 | Method | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "fn the_method(&self)" | ||
16 | ), | ||
17 | documentation: None, | ||
18 | lookup: None, | ||
19 | insert_text: Some( | ||
20 | "the_method()$0" | ||
21 | ), | ||
22 | insert_text_format: Snippet, | ||
23 | source_range: [144; 144), | 10 | source_range: [144; 144), |
24 | text_edit: None | 11 | kind: Method, |
12 | detail: "fn the_method(&self)", | ||
13 | insert_text: "the_method()$0", | ||
14 | insert_text_format: Snippet | ||
25 | } | 15 | } |
26 | ] | 16 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__mod_with_docs.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__mod_with_docs.snap index 3db7119a7..47579bde1 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__mod_with_docs.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__mod_with_docs.snap | |||
@@ -1,26 +1,16 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-25T17:49:28.949186500+00:00" | 2 | created: "2019-02-18T07:29:59.682030298Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "my", | 9 | label: "my", |
11 | kind: Some( | ||
12 | Module | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: Some( | ||
16 | Documentation( | ||
17 | "Some simple\ndocs describing `mod my`." | ||
18 | ) | ||
19 | ), | ||
20 | lookup: None, | ||
21 | insert_text: None, | ||
22 | insert_text_format: PlainText, | ||
23 | source_range: [23; 25), | 10 | source_range: [23; 25), |
24 | text_edit: None | 11 | kind: Module, |
12 | documentation: Documentation( | ||
13 | "Some simple\ndocs describing `mod my`." | ||
14 | ) | ||
25 | } | 15 | } |
26 | ] | 16 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap index f6bba49ae..28efac43f 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap | |||
@@ -1,54 +1,26 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.953151082+00:00" | 2 | created: "2019-02-18T07:29:59.770568686Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "Baz", | 9 | label: "Baz", |
11 | kind: Some( | ||
12 | Enum | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [89; 89), | 10 | source_range: [89; 89), |
20 | text_edit: None | 11 | kind: Enum |
21 | }, | 12 | }, |
22 | CompletionItem { | 13 | CompletionItem { |
23 | completion_kind: Reference, | ||
24 | label: "Foo", | 14 | label: "Foo", |
25 | kind: Some( | ||
26 | Struct | ||
27 | ), | ||
28 | detail: None, | ||
29 | documentation: None, | ||
30 | lookup: None, | ||
31 | insert_text: None, | ||
32 | insert_text_format: PlainText, | ||
33 | source_range: [89; 89), | 15 | source_range: [89; 89), |
34 | text_edit: None | 16 | kind: Struct |
35 | }, | 17 | }, |
36 | CompletionItem { | 18 | CompletionItem { |
37 | completion_kind: Reference, | ||
38 | label: "quux", | 19 | label: "quux", |
39 | kind: Some( | ||
40 | Function | ||
41 | ), | ||
42 | detail: Some( | ||
43 | "fn quux()" | ||
44 | ), | ||
45 | documentation: None, | ||
46 | lookup: None, | ||
47 | insert_text: Some( | ||
48 | "quux()$0" | ||
49 | ), | ||
50 | insert_text_format: Snippet, | ||
51 | source_range: [89; 89), | 20 | source_range: [89; 89), |
52 | text_edit: None | 21 | kind: Function, |
22 | detail: "fn quux()", | ||
23 | insert_text: "quux()$0", | ||
24 | insert_text_format: Snippet | ||
53 | } | 25 | } |
54 | ] | 26 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap index 7c458664e..01b6b968c 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap | |||
@@ -1,40 +1,21 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.959185284+00:00" | 2 | created: "2019-02-18T07:29:59.770992040Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "Bar", | 9 | label: "Bar", |
11 | kind: Some( | ||
12 | Struct | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [101; 101), | 10 | source_range: [101; 101), |
20 | text_edit: None | 11 | kind: Struct |
21 | }, | 12 | }, |
22 | CompletionItem { | 13 | CompletionItem { |
23 | completion_kind: Reference, | ||
24 | label: "quux", | 14 | label: "quux", |
25 | kind: Some( | ||
26 | Function | ||
27 | ), | ||
28 | detail: Some( | ||
29 | "fn quux()" | ||
30 | ), | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "quux()$0" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [101; 101), | 15 | source_range: [101; 101), |
38 | text_edit: None | 16 | kind: Function, |
17 | detail: "fn quux()", | ||
18 | insert_text: "quux()$0", | ||
19 | insert_text_format: Snippet | ||
39 | } | 20 | } |
40 | ] | 21 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap index 62fb0a966..e95763580 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap | |||
@@ -1,36 +1,18 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T14:45:00.723900500+00:00" | 2 | created: "2019-02-18T07:29:59.689653720Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | expression: kind_completions | 5 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "Spam", | 9 | label: "Spam", |
11 | kind: Some( | ||
12 | Struct | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [12; 14), | 10 | source_range: [12; 14), |
20 | text_edit: None | 11 | kind: Struct |
21 | }, | 12 | }, |
22 | CompletionItem { | 13 | CompletionItem { |
23 | completion_kind: Reference, | ||
24 | label: "foo", | 14 | label: "foo", |
25 | kind: Some( | ||
26 | Module | ||
27 | ), | ||
28 | detail: None, | ||
29 | documentation: None, | ||
30 | lookup: None, | ||
31 | insert_text: None, | ||
32 | insert_text_format: PlainText, | ||
33 | source_range: [12; 14), | 15 | source_range: [12; 14), |
34 | text_edit: None | 16 | kind: Module |
35 | } | 17 | } |
36 | ] | 18 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__no_semi_after_break_continue_in_expr.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__no_semi_after_break_continue_in_expr.snap index 5a35d9ca9..1295355a2 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__no_semi_after_break_continue_in_expr.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__no_semi_after_break_continue_in_expr.snap | |||
@@ -1,120 +1,51 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.922933445+00:00" | 2 | created: "2019-02-18T07:29:59.641375216Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | ||
10 | label: "break", | 9 | label: "break", |
11 | kind: Some( | ||
12 | Keyword | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: Some( | ||
18 | "break" | ||
19 | ), | ||
20 | insert_text_format: Snippet, | ||
21 | source_range: [106; 108), | 10 | source_range: [106; 108), |
22 | text_edit: None | 11 | kind: Keyword |
23 | }, | 12 | }, |
24 | CompletionItem { | 13 | CompletionItem { |
25 | completion_kind: Keyword, | ||
26 | label: "continue", | 14 | label: "continue", |
27 | kind: Some( | ||
28 | Keyword | ||
29 | ), | ||
30 | detail: None, | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "continue" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [106; 108), | 15 | source_range: [106; 108), |
38 | text_edit: None | 16 | kind: Keyword |
39 | }, | 17 | }, |
40 | CompletionItem { | 18 | CompletionItem { |
41 | completion_kind: Keyword, | ||
42 | label: "if", | 19 | label: "if", |
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | documentation: None, | ||
48 | lookup: None, | ||
49 | insert_text: Some( | ||
50 | "if $0 {}" | ||
51 | ), | ||
52 | insert_text_format: Snippet, | ||
53 | source_range: [106; 108), | 20 | source_range: [106; 108), |
54 | text_edit: None | 21 | kind: Keyword, |
22 | insert_text: "if $0 {}", | ||
23 | insert_text_format: Snippet | ||
55 | }, | 24 | }, |
56 | CompletionItem { | 25 | CompletionItem { |
57 | completion_kind: Keyword, | ||
58 | label: "loop", | 26 | label: "loop", |
59 | kind: Some( | ||
60 | Keyword | ||
61 | ), | ||
62 | detail: None, | ||
63 | documentation: None, | ||
64 | lookup: None, | ||
65 | insert_text: Some( | ||
66 | "loop {$0}" | ||
67 | ), | ||
68 | insert_text_format: Snippet, | ||
69 | source_range: [106; 108), | 27 | source_range: [106; 108), |
70 | text_edit: None | 28 | kind: Keyword, |
29 | insert_text: "loop {$0}", | ||
30 | insert_text_format: Snippet | ||
71 | }, | 31 | }, |
72 | CompletionItem { | 32 | CompletionItem { |
73 | completion_kind: Keyword, | ||
74 | label: "match", | 33 | label: "match", |
75 | kind: Some( | ||
76 | Keyword | ||
77 | ), | ||
78 | detail: None, | ||
79 | documentation: None, | ||
80 | lookup: None, | ||
81 | insert_text: Some( | ||
82 | "match $0 {}" | ||
83 | ), | ||
84 | insert_text_format: Snippet, | ||
85 | source_range: [106; 108), | 34 | source_range: [106; 108), |
86 | text_edit: None | 35 | kind: Keyword, |
36 | insert_text: "match $0 {}", | ||
37 | insert_text_format: Snippet | ||
87 | }, | 38 | }, |
88 | CompletionItem { | 39 | CompletionItem { |
89 | completion_kind: Keyword, | ||
90 | label: "return", | 40 | label: "return", |
91 | kind: Some( | ||
92 | Keyword | ||
93 | ), | ||
94 | detail: None, | ||
95 | documentation: None, | ||
96 | lookup: None, | ||
97 | insert_text: Some( | ||
98 | "return" | ||
99 | ), | ||
100 | insert_text_format: Snippet, | ||
101 | source_range: [106; 108), | 41 | source_range: [106; 108), |
102 | text_edit: None | 42 | kind: Keyword |
103 | }, | 43 | }, |
104 | CompletionItem { | 44 | CompletionItem { |
105 | completion_kind: Keyword, | ||
106 | label: "while", | 45 | label: "while", |
107 | kind: Some( | ||
108 | Keyword | ||
109 | ), | ||
110 | detail: None, | ||
111 | documentation: None, | ||
112 | lookup: None, | ||
113 | insert_text: Some( | ||
114 | "while $0 {}" | ||
115 | ), | ||
116 | insert_text_format: Snippet, | ||
117 | source_range: [106; 108), | 46 | source_range: [106; 108), |
118 | text_edit: None | 47 | kind: Keyword, |
48 | insert_text: "while $0 {}", | ||
49 | insert_text_format: Snippet | ||
119 | } | 50 | } |
120 | ] | 51 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap index a5a7713ef..dba925f7c 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap | |||
@@ -1,22 +1,13 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T14:45:00.545423800+00:00" | 2 | created: "2019-02-18T07:29:59.606265507Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | expression: kind_completions | 5 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Magic, | ||
10 | label: "file_id: FileId", | 9 | label: "file_id: FileId", |
11 | kind: None, | ||
12 | detail: None, | ||
13 | documentation: None, | ||
14 | lookup: Some( | ||
15 | "file_id" | ||
16 | ), | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [98; 102), | 10 | source_range: [98; 102), |
20 | text_edit: None | 11 | lookup: "file_id" |
21 | } | 12 | } |
22 | ] | 13 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap index 0df4fcf57..c5873becb 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap | |||
@@ -1,22 +1,13 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T14:45:00.552379600+00:00" | 2 | created: "2019-02-18T07:29:59.606265538Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | expression: kind_completions | 5 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Magic, | ||
10 | label: "file_id: FileId", | 9 | label: "file_id: FileId", |
11 | kind: None, | ||
12 | detail: None, | ||
13 | documentation: None, | ||
14 | lookup: Some( | ||
15 | "file_id" | ||
16 | ), | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [98; 102), | 10 | source_range: [98; 102), |
20 | text_edit: None | 11 | lookup: "file_id" |
21 | } | 12 | } |
22 | ] | 13 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap index 905ece338..5231db54c 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap | |||
@@ -1,22 +1,13 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T14:45:00.619180200+00:00" | 2 | created: "2019-02-18T07:29:59.628419014Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | expression: kind_completions | 5 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Magic, | ||
10 | label: "file_id: FileId", | 9 | label: "file_id: FileId", |
11 | kind: None, | ||
12 | detail: None, | ||
13 | documentation: None, | ||
14 | lookup: Some( | ||
15 | "file_id" | ||
16 | ), | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [269; 273), | 10 | source_range: [269; 273), |
20 | text_edit: None | 11 | lookup: "file_id" |
21 | } | 12 | } |
22 | ] | 13 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__postfix_completion_works_for_trivial_path_expression.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__postfix_completion_works_for_trivial_path_expression.snap index d3e53e4e8..bd22d546a 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__postfix_completion_works_for_trivial_path_expression.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__postfix_completion_works_for_trivial_path_expression.snap | |||
@@ -1,183 +1,113 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-02-14T18:33:26.102469493Z" | 2 | created: "2019-02-18T07:29:59.734401559Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | 5 | expression: kind_completions |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Postfix, | ||
10 | label: "dbg", | 9 | label: "dbg", |
11 | kind: None, | ||
12 | detail: Some( | ||
13 | "dbg!(expr)" | ||
14 | ), | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: Some( | ||
18 | "dbg!(bar)" | ||
19 | ), | ||
20 | insert_text_format: Snippet, | ||
21 | source_range: [76; 76), | 10 | source_range: [76; 76), |
22 | text_edit: Some( | 11 | detail: "dbg!(expr)", |
23 | TextEdit { | 12 | insert_text: "dbg!(bar)", |
24 | atoms: [ | 13 | insert_text_format: Snippet, |
25 | AtomTextEdit { | 14 | text_edit: TextEdit { |
26 | delete: [72; 76), | 15 | atoms: [ |
27 | insert: "" | 16 | AtomTextEdit { |
28 | } | 17 | delete: [72; 76), |
29 | ] | 18 | insert: "" |
30 | } | 19 | } |
31 | ) | 20 | ] |
21 | } | ||
32 | }, | 22 | }, |
33 | CompletionItem { | 23 | CompletionItem { |
34 | completion_kind: Postfix, | ||
35 | label: "if", | 24 | label: "if", |
36 | kind: None, | ||
37 | detail: Some( | ||
38 | "if expr {}" | ||
39 | ), | ||
40 | documentation: None, | ||
41 | lookup: None, | ||
42 | insert_text: Some( | ||
43 | "if bar {$0}" | ||
44 | ), | ||
45 | insert_text_format: Snippet, | ||
46 | source_range: [76; 76), | 25 | source_range: [76; 76), |
47 | text_edit: Some( | 26 | detail: "if expr {}", |
48 | TextEdit { | 27 | insert_text: "if bar {$0}", |
49 | atoms: [ | 28 | insert_text_format: Snippet, |
50 | AtomTextEdit { | 29 | text_edit: TextEdit { |
51 | delete: [72; 76), | 30 | atoms: [ |
52 | insert: "" | 31 | AtomTextEdit { |
53 | } | 32 | delete: [72; 76), |
54 | ] | 33 | insert: "" |
55 | } | 34 | } |
56 | ) | 35 | ] |
36 | } | ||
57 | }, | 37 | }, |
58 | CompletionItem { | 38 | CompletionItem { |
59 | completion_kind: Postfix, | ||
60 | label: "match", | 39 | label: "match", |
61 | kind: None, | ||
62 | detail: Some( | ||
63 | "match expr {}" | ||
64 | ), | ||
65 | documentation: None, | ||
66 | lookup: None, | ||
67 | insert_text: Some( | ||
68 | "match bar {\n${1:_} => {$0\\},\n}" | ||
69 | ), | ||
70 | insert_text_format: Snippet, | ||
71 | source_range: [76; 76), | 40 | source_range: [76; 76), |
72 | text_edit: Some( | 41 | detail: "match expr {}", |
73 | TextEdit { | 42 | insert_text: "match bar {\n${1:_} => {$0\\},\n}", |
74 | atoms: [ | 43 | insert_text_format: Snippet, |
75 | AtomTextEdit { | 44 | text_edit: TextEdit { |
76 | delete: [72; 76), | 45 | atoms: [ |
77 | insert: "" | 46 | AtomTextEdit { |
78 | } | 47 | delete: [72; 76), |
79 | ] | 48 | insert: "" |
80 | } | 49 | } |
81 | ) | 50 | ] |
51 | } | ||
82 | }, | 52 | }, |
83 | CompletionItem { | 53 | CompletionItem { |
84 | completion_kind: Postfix, | ||
85 | label: "not", | 54 | label: "not", |
86 | kind: None, | ||
87 | detail: Some( | ||
88 | "!expr" | ||
89 | ), | ||
90 | documentation: None, | ||
91 | lookup: None, | ||
92 | insert_text: Some( | ||
93 | "!bar" | ||
94 | ), | ||
95 | insert_text_format: Snippet, | ||
96 | source_range: [76; 76), | 55 | source_range: [76; 76), |
97 | text_edit: Some( | 56 | detail: "!expr", |
98 | TextEdit { | 57 | insert_text: "!bar", |
99 | atoms: [ | 58 | insert_text_format: Snippet, |
100 | AtomTextEdit { | 59 | text_edit: TextEdit { |
101 | delete: [72; 76), | 60 | atoms: [ |
102 | insert: "" | 61 | AtomTextEdit { |
103 | } | 62 | delete: [72; 76), |
104 | ] | 63 | insert: "" |
105 | } | 64 | } |
106 | ) | 65 | ] |
66 | } | ||
107 | }, | 67 | }, |
108 | CompletionItem { | 68 | CompletionItem { |
109 | completion_kind: Postfix, | ||
110 | label: "ref", | 69 | label: "ref", |
111 | kind: None, | ||
112 | detail: Some( | ||
113 | "&expr" | ||
114 | ), | ||
115 | documentation: None, | ||
116 | lookup: None, | ||
117 | insert_text: Some( | ||
118 | "&bar" | ||
119 | ), | ||
120 | insert_text_format: Snippet, | ||
121 | source_range: [76; 76), | 70 | source_range: [76; 76), |
122 | text_edit: Some( | 71 | detail: "&expr", |
123 | TextEdit { | 72 | insert_text: "&bar", |
124 | atoms: [ | 73 | insert_text_format: Snippet, |
125 | AtomTextEdit { | 74 | text_edit: TextEdit { |
126 | delete: [72; 76), | 75 | atoms: [ |
127 | insert: "" | 76 | AtomTextEdit { |
128 | } | 77 | delete: [72; 76), |
129 | ] | 78 | insert: "" |
130 | } | 79 | } |
131 | ) | 80 | ] |
81 | } | ||
132 | }, | 82 | }, |
133 | CompletionItem { | 83 | CompletionItem { |
134 | completion_kind: Postfix, | ||
135 | label: "refm", | 84 | label: "refm", |
136 | kind: None, | ||
137 | detail: Some( | ||
138 | "&mut expr" | ||
139 | ), | ||
140 | documentation: None, | ||
141 | lookup: None, | ||
142 | insert_text: Some( | ||
143 | "&mut bar" | ||
144 | ), | ||
145 | insert_text_format: Snippet, | ||
146 | source_range: [76; 76), | 85 | source_range: [76; 76), |
147 | text_edit: Some( | 86 | detail: "&mut expr", |
148 | TextEdit { | 87 | insert_text: "&mut bar", |
149 | atoms: [ | 88 | insert_text_format: Snippet, |
150 | AtomTextEdit { | 89 | text_edit: TextEdit { |
151 | delete: [72; 76), | 90 | atoms: [ |
152 | insert: "" | 91 | AtomTextEdit { |
153 | } | 92 | delete: [72; 76), |
154 | ] | 93 | insert: "" |
155 | } | 94 | } |
156 | ) | 95 | ] |
96 | } | ||
157 | }, | 97 | }, |
158 | CompletionItem { | 98 | CompletionItem { |
159 | completion_kind: Postfix, | ||
160 | label: "while", | 99 | label: "while", |
161 | kind: None, | ||
162 | detail: Some( | ||
163 | "while expr {}" | ||
164 | ), | ||
165 | documentation: None, | ||
166 | lookup: None, | ||
167 | insert_text: Some( | ||
168 | "while bar {\n$0\n}" | ||
169 | ), | ||
170 | insert_text_format: Snippet, | ||
171 | source_range: [76; 76), | 100 | source_range: [76; 76), |
172 | text_edit: Some( | 101 | detail: "while expr {}", |
173 | TextEdit { | 102 | insert_text: "while bar {\n$0\n}", |
174 | atoms: [ | 103 | insert_text_format: Snippet, |
175 | AtomTextEdit { | 104 | text_edit: TextEdit { |
176 | delete: [72; 76), | 105 | atoms: [ |
177 | insert: "" | 106 | AtomTextEdit { |
178 | } | 107 | delete: [72; 76), |
179 | ] | 108 | insert: "" |
180 | } | 109 | } |
181 | ) | 110 | ] |
111 | } | ||
182 | } | 112 | } |
183 | ] | 113 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap index adc057d80..25c5007e4 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap | |||
@@ -1,40 +1,21 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.421411+00:00" | 2 | created: "2019-02-18T07:29:59.780512486Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "Foo", | 9 | label: "Foo", |
11 | kind: Some( | ||
12 | Struct | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [47; 47), | 10 | source_range: [47; 47), |
20 | text_edit: None | 11 | kind: Struct |
21 | }, | 12 | }, |
22 | CompletionItem { | 13 | CompletionItem { |
23 | completion_kind: Reference, | ||
24 | label: "x", | 14 | label: "x", |
25 | kind: Some( | ||
26 | Function | ||
27 | ), | ||
28 | detail: Some( | ||
29 | "fn x() ->" | ||
30 | ), | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "x()$0" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [47; 47), | 15 | source_range: [47; 47), |
38 | text_edit: None | 16 | kind: Function, |
17 | detail: "fn x() ->", | ||
18 | insert_text: "x()$0", | ||
19 | insert_text_format: Snippet | ||
39 | } | 20 | } |
40 | ] | 21 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap index ba1d4abbd..d390be2dc 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap | |||
@@ -1,36 +1,18 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T20:17:10.051725945+00:00" | 2 | created: "2019-02-18T07:29:59.774705610Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "Self", | 9 | label: "Self", |
11 | kind: Some( | ||
12 | TypeParam | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [25; 25), | 10 | source_range: [25; 25), |
20 | text_edit: None | 11 | kind: TypeParam |
21 | }, | 12 | }, |
22 | CompletionItem { | 13 | CompletionItem { |
23 | completion_kind: Reference, | ||
24 | label: "self", | 14 | label: "self", |
25 | kind: Some( | ||
26 | Binding | ||
27 | ), | ||
28 | detail: None, | ||
29 | documentation: None, | ||
30 | lookup: None, | ||
31 | insert_text: None, | ||
32 | insert_text_format: PlainText, | ||
33 | source_range: [25; 25), | 15 | source_range: [25; 25), |
34 | text_edit: None | 16 | kind: Binding |
35 | } | 17 | } |
36 | ] | 18 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap index 580c90bdd..6ad919849 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap | |||
@@ -1,40 +1,22 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.430450+00:00" | 2 | created: "2019-02-18T07:29:59.799497268Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Snippet, | ||
10 | label: "pd", | 9 | label: "pd", |
11 | kind: Some( | ||
12 | Snippet | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: Some( | ||
18 | "eprintln!(\"$0 = {:?}\", $0);" | ||
19 | ), | ||
20 | insert_text_format: Snippet, | ||
21 | source_range: [17; 17), | 10 | source_range: [17; 17), |
22 | text_edit: None | 11 | kind: Snippet, |
12 | insert_text: "eprintln!(\"$0 = {:?}\", $0);", | ||
13 | insert_text_format: Snippet | ||
23 | }, | 14 | }, |
24 | CompletionItem { | 15 | CompletionItem { |
25 | completion_kind: Snippet, | ||
26 | label: "ppd", | 16 | label: "ppd", |
27 | kind: Some( | ||
28 | Snippet | ||
29 | ), | ||
30 | detail: None, | ||
31 | documentation: None, | ||
32 | lookup: None, | ||
33 | insert_text: Some( | ||
34 | "eprintln!(\"$0 = {:#?}\", $0);" | ||
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [17; 17), | 17 | source_range: [17; 17), |
38 | text_edit: None | 18 | kind: Snippet, |
19 | insert_text: "eprintln!(\"$0 = {:#?}\", $0);", | ||
20 | insert_text_format: Snippet | ||
39 | } | 21 | } |
40 | ] | 22 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap index ec95e454c..43367010b 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap | |||
@@ -1,42 +1,23 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.435110+00:00" | 2 | created: "2019-02-18T07:29:59.800831987Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Snippet, | ||
10 | label: "Test function", | 9 | label: "Test function", |
11 | kind: Some( | ||
12 | Snippet | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: Some( | ||
17 | "tfn" | ||
18 | ), | ||
19 | insert_text: Some( | ||
20 | "#[test]\nfn ${1:feature}() {\n $0\n}" | ||
21 | ), | ||
22 | insert_text_format: Snippet, | ||
23 | source_range: [66; 66), | 10 | source_range: [66; 66), |
24 | text_edit: None | 11 | kind: Snippet, |
12 | lookup: "tfn", | ||
13 | insert_text: "#[test]\nfn ${1:feature}() {\n $0\n}", | ||
14 | insert_text_format: Snippet | ||
25 | }, | 15 | }, |
26 | CompletionItem { | 16 | CompletionItem { |
27 | completion_kind: Snippet, | ||
28 | label: "pub(crate)", | 17 | label: "pub(crate)", |
29 | kind: Some( | ||
30 | Snippet | ||
31 | ), | ||
32 | detail: None, | ||
33 | documentation: None, | ||
34 | lookup: None, | ||
35 | insert_text: Some( | ||
36 | "pub(crate) $0" | ||
37 | ), | ||
38 | insert_text_format: Snippet, | ||
39 | source_range: [66; 66), | 18 | source_range: [66; 66), |
40 | text_edit: None | 19 | kind: Snippet, |
20 | insert_text: "pub(crate) $0", | ||
21 | insert_text_format: Snippet | ||
41 | } | 22 | } |
42 | ] | 23 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap index ff1eef5f5..c78b06d3c 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap | |||
@@ -1,28 +1,17 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-02-12T09:57:51.107816726Z" | 2 | created: "2019-02-18T07:29:59.704544613Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | 5 | expression: kind_completions |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "C", | 9 | label: "C", |
11 | kind: Some( | ||
12 | Const | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "const C: i32 = 42;" | ||
16 | ), | ||
17 | documentation: Some( | ||
18 | Documentation( | ||
19 | "An associated const" | ||
20 | ) | ||
21 | ), | ||
22 | lookup: None, | ||
23 | insert_text: None, | ||
24 | insert_text_format: PlainText, | ||
25 | source_range: [107; 107), | 10 | source_range: [107; 107), |
26 | text_edit: None | 11 | kind: Const, |
12 | detail: "const C: i32 = 42;", | ||
13 | documentation: Documentation( | ||
14 | "An associated const" | ||
15 | ) | ||
27 | } | 16 | } |
28 | ] | 17 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap index c53c61d0e..67638b4d1 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap | |||
@@ -1,30 +1,19 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-02-12T09:57:51.106389138Z" | 2 | created: "2019-02-18T07:29:59.704544615Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | 5 | expression: kind_completions |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "m", | 9 | label: "m", |
11 | kind: Some( | ||
12 | Method | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "fn m()" | ||
16 | ), | ||
17 | documentation: Some( | ||
18 | Documentation( | ||
19 | "An associated method" | ||
20 | ) | ||
21 | ), | ||
22 | lookup: None, | ||
23 | insert_text: Some( | ||
24 | "m()$0" | ||
25 | ), | ||
26 | insert_text_format: Snippet, | ||
27 | source_range: [100; 100), | 10 | source_range: [100; 100), |
28 | text_edit: None | 11 | kind: Method, |
12 | detail: "fn m()", | ||
13 | documentation: Documentation( | ||
14 | "An associated method" | ||
15 | ), | ||
16 | insert_text: "m()$0", | ||
17 | insert_text_format: Snippet | ||
29 | } | 18 | } |
30 | ] | 19 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap index e993fb1b0..c5f5b9f10 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap | |||
@@ -1,28 +1,17 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-02-12T09:33:54.719956203Z" | 2 | created: "2019-02-18T07:29:59.725668999Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | 5 | expression: kind_completions |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "T", | 9 | label: "T", |
11 | kind: Some( | ||
12 | TypeAlias | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "type T = i32;" | ||
16 | ), | ||
17 | documentation: Some( | ||
18 | Documentation( | ||
19 | "An associated type" | ||
20 | ) | ||
21 | ), | ||
22 | lookup: None, | ||
23 | insert_text: None, | ||
24 | insert_text_format: PlainText, | ||
25 | source_range: [101; 101), | 10 | source_range: [101; 101), |
26 | text_edit: None | 11 | kind: TypeAlias, |
12 | detail: "type T = i32;", | ||
13 | documentation: Documentation( | ||
14 | "An associated type" | ||
15 | ) | ||
27 | } | 16 | } |
28 | ] | 17 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap index e8dc12dfd..ffad98f7d 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap | |||
@@ -1,24 +1,14 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T14:45:00.545423800+00:00" | 2 | created: "2019-02-18T07:29:59.599230647Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | expression: kind_completions | 5 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "the_field", | 9 | label: "the_field", |
11 | kind: Some( | ||
12 | Field | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "u32" | ||
16 | ), | ||
17 | documentation: None, | ||
18 | lookup: None, | ||
19 | insert_text: None, | ||
20 | insert_text_format: PlainText, | ||
21 | source_range: [85; 85), | 10 | source_range: [85; 85), |
22 | text_edit: None | 11 | kind: Field, |
12 | detail: "u32" | ||
23 | } | 13 | } |
24 | ] | 14 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap index 4d5c7a869..99aef933a 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap | |||
@@ -1,42 +1,22 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.910113268+00:00" | 2 | created: "2019-02-18T07:29:59.598966298Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "foo", | 9 | label: "foo", |
11 | kind: Some( | ||
12 | Method | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "fn foo(&self)" | ||
16 | ), | ||
17 | documentation: None, | ||
18 | lookup: None, | ||
19 | insert_text: Some( | ||
20 | "foo()$0" | ||
21 | ), | ||
22 | insert_text_format: Snippet, | ||
23 | source_range: [126; 126), | 10 | source_range: [126; 126), |
24 | text_edit: None | 11 | kind: Method, |
12 | detail: "fn foo(&self)", | ||
13 | insert_text: "foo()$0", | ||
14 | insert_text_format: Snippet | ||
25 | }, | 15 | }, |
26 | CompletionItem { | 16 | CompletionItem { |
27 | completion_kind: Reference, | ||
28 | label: "the_field", | 17 | label: "the_field", |
29 | kind: Some( | ||
30 | Field | ||
31 | ), | ||
32 | detail: Some( | ||
33 | "(u32, i32)" | ||
34 | ), | ||
35 | documentation: None, | ||
36 | lookup: None, | ||
37 | insert_text: None, | ||
38 | insert_text_format: PlainText, | ||
39 | source_range: [126; 126), | 18 | source_range: [126; 126), |
40 | text_edit: None | 19 | kind: Field, |
20 | detail: "(u32, i32)" | ||
41 | } | 21 | } |
42 | ] | 22 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap index 1073d90fd..52991b9fb 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap | |||
@@ -1,46 +1,25 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-27T19:56:59.909689544+00:00" | 2 | created: "2019-02-18T07:29:59.598965593Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "foo", | 9 | label: "foo", |
11 | kind: Some( | ||
12 | Method | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "fn foo(self)" | ||
16 | ), | ||
17 | documentation: None, | ||
18 | lookup: None, | ||
19 | insert_text: Some( | ||
20 | "foo()$0" | ||
21 | ), | ||
22 | insert_text_format: Snippet, | ||
23 | source_range: [187; 187), | 10 | source_range: [187; 187), |
24 | text_edit: None | 11 | kind: Method, |
12 | detail: "fn foo(self)", | ||
13 | insert_text: "foo()$0", | ||
14 | insert_text_format: Snippet | ||
25 | }, | 15 | }, |
26 | CompletionItem { | 16 | CompletionItem { |
27 | completion_kind: Reference, | ||
28 | label: "the_field", | 17 | label: "the_field", |
29 | kind: Some( | ||
30 | Field | ||
31 | ), | ||
32 | detail: Some( | ||
33 | "(u32,)" | ||
34 | ), | ||
35 | documentation: Some( | ||
36 | Documentation( | ||
37 | "This is the_field" | ||
38 | ) | ||
39 | ), | ||
40 | lookup: None, | ||
41 | insert_text: None, | ||
42 | insert_text_format: PlainText, | ||
43 | source_range: [187; 187), | 18 | source_range: [187; 187), |
44 | text_edit: None | 19 | kind: Field, |
20 | detail: "(u32,)", | ||
21 | documentation: Documentation( | ||
22 | "This is the_field" | ||
23 | ) | ||
45 | } | 24 | } |
46 | ] | 25 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__tuple_field_completion.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__tuple_field_completion.snap index c9764eab3..5b6ed9d77 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__tuple_field_completion.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__tuple_field_completion.snap | |||
@@ -1,40 +1,20 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-24T13:22:02.107228200+00:00" | 2 | created: "2019-02-18T07:29:59.598973382Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | ||
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "0", | 9 | label: "0", |
11 | kind: Some( | ||
12 | Field | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "i32" | ||
16 | ), | ||
17 | documentation: None, | ||
18 | lookup: None, | ||
19 | insert_text: None, | ||
20 | insert_text_format: PlainText, | ||
21 | source_range: [75; 75), | 10 | source_range: [75; 75), |
22 | text_edit: None | 11 | kind: Field, |
12 | detail: "i32" | ||
23 | }, | 13 | }, |
24 | CompletionItem { | 14 | CompletionItem { |
25 | completion_kind: Reference, | ||
26 | label: "1", | 15 | label: "1", |
27 | kind: Some( | ||
28 | Field | ||
29 | ), | ||
30 | detail: Some( | ||
31 | "f64" | ||
32 | ), | ||
33 | documentation: None, | ||
34 | lookup: None, | ||
35 | insert_text: None, | ||
36 | insert_text_format: PlainText, | ||
37 | source_range: [75; 75), | 16 | source_range: [75; 75), |
38 | text_edit: None | 17 | kind: Field, |
18 | detail: "f64" | ||
39 | } | 19 | } |
40 | ] | 20 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap index 01294ca40..3c670ad5b 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap | |||
@@ -1,36 +1,18 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T14:45:00.761799100+00:00" | 2 | created: "2019-02-18T07:29:59.726365989Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | expression: kind_completions | 5 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "Spam", | 9 | label: "Spam", |
11 | kind: Some( | ||
12 | Struct | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [11; 13), | 10 | source_range: [11; 13), |
20 | text_edit: None | 11 | kind: Struct |
21 | }, | 12 | }, |
22 | CompletionItem { | 13 | CompletionItem { |
23 | completion_kind: Reference, | ||
24 | label: "foo", | 14 | label: "foo", |
25 | kind: Some( | ||
26 | Module | ||
27 | ), | ||
28 | detail: None, | ||
29 | documentation: None, | ||
30 | lookup: None, | ||
31 | insert_text: None, | ||
32 | insert_text_format: PlainText, | ||
33 | source_range: [11; 13), | 15 | source_range: [11; 13), |
34 | text_edit: None | 16 | kind: Module |
35 | } | 17 | } |
36 | ] | 18 | ] |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap index 33dd2b904..bf314de84 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap | |||
@@ -1,22 +1,13 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T14:45:00.780748400+00:00" | 2 | created: "2019-02-18T07:29:59.731789946Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | expression: kind_completions | 5 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | ||
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | ||
10 | label: "Bar", | 9 | label: "Bar", |
11 | kind: Some( | ||
12 | Struct | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [26; 26), | 10 | source_range: [26; 26), |
20 | text_edit: None | 11 | kind: Struct |
21 | } | 12 | } |
22 | ] | 13 | ] |