mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 13:48:50 +00:00
don't complete top level attrs inside nested attrs and add better labels #4899
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This commit is contained in:
parent
3df879f139
commit
5aad6c9fa6
1 changed files with 1 additions and 8 deletions
|
@ -20,14 +20,7 @@ pub(super) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext)
|
|||
{
|
||||
complete_derive(acc, ctx, token_tree)
|
||||
}
|
||||
(_, Some(ast::AttrInput::TokenTree(token_tree))) => {
|
||||
let token_tree_str = token_tree.to_string();
|
||||
let nested = token_tree_str.starts_with('(') && token_tree_str.ends_with(')');
|
||||
|
||||
if !nested {
|
||||
complete_attribute_start(acc, ctx, attribute);
|
||||
}
|
||||
}
|
||||
(_, Some(ast::AttrInput::TokenTree(_token_tree))) => {}
|
||||
_ => complete_attribute_start(acc, ctx, attribute),
|
||||
}
|
||||
Some(())
|
||||
|
|
Loading…
Reference in a new issue