-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
801: Implement completion for associated items r=matklad a=lnicola Fixes #747. r? @matklad Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
- Loading branch information
Showing
7 changed files
with
265 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
created: "2019-02-12T09:57:51.107816726Z" | ||
creator: insta@0.6.2 | ||
source: crates/ra_ide_api/src/completion/completion_item.rs | ||
expression: kind_completions | ||
--- | ||
[ | ||
CompletionItem { | ||
completion_kind: Reference, | ||
label: "C", | ||
kind: Some( | ||
Const | ||
), | ||
detail: Some( | ||
"const C: i32 = 42;" | ||
), | ||
documentation: Some( | ||
Documentation( | ||
"An associated const" | ||
) | ||
), | ||
lookup: None, | ||
insert_text: None, | ||
insert_text_format: PlainText, | ||
source_range: [107; 107), | ||
text_edit: None | ||
} | ||
] |
30 changes: 30 additions & 0 deletions
30
crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
created: "2019-02-12T09:57:51.106389138Z" | ||
creator: insta@0.6.2 | ||
source: crates/ra_ide_api/src/completion/completion_item.rs | ||
expression: kind_completions | ||
--- | ||
[ | ||
CompletionItem { | ||
completion_kind: Reference, | ||
label: "m", | ||
kind: Some( | ||
Method | ||
), | ||
detail: Some( | ||
"fn m()" | ||
), | ||
documentation: Some( | ||
Documentation( | ||
"An associated method" | ||
) | ||
), | ||
lookup: None, | ||
insert_text: Some( | ||
"m()$0" | ||
), | ||
insert_text_format: Snippet, | ||
source_range: [100; 100), | ||
text_edit: None | ||
} | ||
] |
28 changes: 28 additions & 0 deletions
28
crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
created: "2019-02-12T09:33:54.719956203Z" | ||
creator: insta@0.6.2 | ||
source: crates/ra_ide_api/src/completion/completion_item.rs | ||
expression: kind_completions | ||
--- | ||
[ | ||
CompletionItem { | ||
completion_kind: Reference, | ||
label: "T", | ||
kind: Some( | ||
TypeAlias | ||
), | ||
detail: Some( | ||
"type T = i32;" | ||
), | ||
documentation: Some( | ||
Documentation( | ||
"An associated type" | ||
) | ||
), | ||
lookup: None, | ||
insert_text: None, | ||
insert_text_format: PlainText, | ||
source_range: [101; 101), | ||
text_edit: None | ||
} | ||
] |