diff options
author | Kirill Bulatov <[email protected]> | 2020-09-07 22:54:58 +0100 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2020-09-09 23:42:20 +0100 |
commit | 57a260f579fec4082aa9e7a30d4b190f06d45877 (patch) | |
tree | cfb13fc5d355c72648f804f5727c7723b69d52bf /crates/ide/src/completion/complete_mod.rs | |
parent | cc43abcde87ed4a834f3b56a96ef165d8e4f0d86 (diff) |
Properly reacto to keywords
Diffstat (limited to 'crates/ide/src/completion/complete_mod.rs')
-rw-r--r-- | crates/ide/src/completion/complete_mod.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/ide/src/completion/complete_mod.rs b/crates/ide/src/completion/complete_mod.rs index c5757a310..5d41d0f69 100644 --- a/crates/ide/src/completion/complete_mod.rs +++ b/crates/ide/src/completion/complete_mod.rs | |||
@@ -9,6 +9,12 @@ use super::{completion_context::CompletionContext, completion_item::Completions} | |||
9 | 9 | ||
10 | /// Complete mod declaration, i.e. `mod <|> ;` | 10 | /// Complete mod declaration, i.e. `mod <|> ;` |
11 | pub(super) fn complete_mod(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> { | 11 | pub(super) fn complete_mod(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> { |
12 | let _p = profile::span("completion::complete_mod"); | ||
13 | |||
14 | if !ctx.mod_is_prev { | ||
15 | return None; | ||
16 | } | ||
17 | |||
12 | let current_module = ctx.scope.module()?; | 18 | let current_module = ctx.scope.module()?; |
13 | 19 | ||
14 | let module_definition_file = | 20 | let module_definition_file = |
@@ -63,7 +69,7 @@ pub(super) fn complete_mod(acc: &mut Completions, ctx: &CompletionContext) -> Op | |||
63 | .collect::<Vec<_>>(); | 69 | .collect::<Vec<_>>(); |
64 | dbg!(mod_declaration_candidates); | 70 | dbg!(mod_declaration_candidates); |
65 | 71 | ||
66 | // TODO kb exlude existing children from the candidates | 72 | // TODO kb actually add the results |
67 | 73 | ||
68 | Some(()) | 74 | Some(()) |
69 | } | 75 | } |