aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/completion/complete_attribute.rs
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-09-07 22:54:58 +0100
committerKirill Bulatov <[email protected]>2020-09-09 23:42:20 +0100
commit57a260f579fec4082aa9e7a30d4b190f06d45877 (patch)
treecfb13fc5d355c72648f804f5727c7723b69d52bf /crates/ide/src/completion/complete_attribute.rs
parentcc43abcde87ed4a834f3b56a96ef165d8e4f0d86 (diff)
Properly reacto to keywords
Diffstat (limited to 'crates/ide/src/completion/complete_attribute.rs')
-rw-r--r--crates/ide/src/completion/complete_attribute.rs4
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
15pub(super) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> { 15pub(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" => {