mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Properly reacto to keywords
This commit is contained in:
parent
cc43abcde8
commit
57a260f579
6 changed files with 28 additions and 4 deletions
|
@ -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" => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue