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_attribute.rs | |
parent | cc43abcde87ed4a834f3b56a96ef165d8e4f0d86 (diff) |
Properly reacto to keywords
Diffstat (limited to 'crates/ide/src/completion/complete_attribute.rs')
-rw-r--r-- | crates/ide/src/completion/complete_attribute.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ide/src/completion/complete_attribute.rs b/crates/ide/src/completion/complete_attribute.rs index 0abfaebcb..6394189f0 100644 --- a/crates/ide/src/completion/complete_attribute.rs +++ b/crates/ide/src/completion/complete_attribute.rs | |||
@@ -13,6 +13,10 @@ use crate::completion::{ | |||
13 | }; | 13 | }; |
14 | 14 | ||
15 | pub(super) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> { | 15 | pub(super) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> { |
16 | if ctx.mod_is_prev { | ||
17 | return None; | ||
18 | } | ||
19 | |||
16 | let attribute = ctx.attribute_under_caret.as_ref()?; | 20 | let attribute = ctx.attribute_under_caret.as_ref()?; |
17 | match (attribute.path(), attribute.token_tree()) { | 21 | match (attribute.path(), attribute.token_tree()) { |
18 | (Some(path), Some(token_tree)) if path.to_string() == "derive" => { | 22 | (Some(path), Some(token_tree)) if path.to_string() == "derive" => { |