Properly reacto to keywords

This commit is contained in:
Kirill Bulatov 2020-09-08 00:54:58 +03:00
parent cc43abcde8
commit 57a260f579
6 changed files with 28 additions and 4 deletions

View file

@ -13,6 +13,10 @@ use crate::completion::{
};
pub(super) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> {
if ctx.mod_is_prev {
return None;
}
let attribute = ctx.attribute_under_caret.as_ref()?;
match (attribute.path(), attribute.token_tree()) {
(Some(path), Some(token_tree)) if path.to_string() == "derive" => {