aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/completions/mod_.rs
diff options
context:
space:
mode:
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(())