mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Introduce NameRefKind for completions
This commit is contained in:
parent
7322a982f9
commit
6e07b17f69
12 changed files with 134 additions and 95 deletions
|
@ -8,7 +8,8 @@ use syntax::SmolStr;
|
|||
|
||||
use crate::{
|
||||
context::{
|
||||
CompletionContext, DotAccess, DotAccessKind, NameRefContext, PathCompletionCtx, PathKind,
|
||||
CompletionContext, DotAccess, DotAccessKind, NameRefContext, NameRefKind,
|
||||
PathCompletionCtx, PathKind,
|
||||
},
|
||||
item::{Builder, CompletionItem, CompletionItemKind, CompletionRelevance},
|
||||
render::{compute_exact_name_match, compute_ref_match, compute_type_match, RenderContext},
|
||||
|
@ -212,7 +213,10 @@ fn should_add_parens(ctx: &CompletionContext) -> bool {
|
|||
if matches!(
|
||||
ctx.nameref_ctx(),
|
||||
Some(NameRefContext {
|
||||
dot_access: Some(DotAccess { kind: DotAccessKind::Method { has_parens: true }, .. }),
|
||||
kind: Some(NameRefKind::DotAccess(DotAccess {
|
||||
kind: DotAccessKind::Method { has_parens: true },
|
||||
..
|
||||
})),
|
||||
..
|
||||
})
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue