aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/completions/mod_.rs
diff options
context:
space:
mode:
authorIgor Aleksanov <[email protected]>2020-10-25 08:26:38 +0000
committerIgor Aleksanov <[email protected]>2020-10-25 08:26:38 +0000
commitf731d910cbfe36bbdfa3a3f1415d5c48c4a79238 (patch)
treecc221d5bad05e1b6dc8e30f876b29d274b05e827 /crates/completion/src/completions/mod_.rs
parent19c10672023ead0c1d64486154b6c4145b649568 (diff)
Move Completions structure definition into completions module
Diffstat (limited to 'crates/completion/src/completions/mod_.rs')
-rw-r--r--crates/completion/src/completions/mod_.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/completion/src/completions/mod_.rs b/crates/completion/src/completions/mod_.rs
index 9612ca36a..c96f84171 100644
--- a/crates/completion/src/completions/mod_.rs
+++ b/crates/completion/src/completions/mod_.rs
@@ -7,7 +7,7 @@ use rustc_hash::FxHashSet;
7 7
8use crate::{CompletionItem, CompletionItemKind}; 8use crate::{CompletionItem, CompletionItemKind};
9 9
10use crate::{context::CompletionContext, item::CompletionKind, item::Completions}; 10use crate::{context::CompletionContext, item::CompletionKind, Completions};
11 11
12/// Complete mod declaration, i.e. `mod <|> ;` 12/// Complete mod declaration, i.e. `mod <|> ;`
13pub(crate) fn complete_mod(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> { 13pub(crate) fn complete_mod(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> {
@@ -75,10 +75,9 @@ pub(crate) fn complete_mod(acc: &mut Completions, ctx: &CompletionContext) -> Op
75 if mod_under_caret.semicolon_token().is_none() { 75 if mod_under_caret.semicolon_token().is_none() {
76 label.push(';') 76 label.push(';')
77 } 77 }
78 acc.add( 78 CompletionItem::new(CompletionKind::Magic, ctx.source_range(), &label)
79 CompletionItem::new(CompletionKind::Magic, ctx.source_range(), &label) 79 .kind(CompletionItemKind::Module)
80 .kind(CompletionItemKind::Module), 80 .add_to(acc)
81 )
82 }); 81 });
83 82
84 Some(()) 83 Some(())