mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Add LifetimeParam and ConstParam to CompletionItemKind
This commit is contained in:
parent
f647e134a7
commit
83e49200d8
4 changed files with 34 additions and 24 deletions
|
@ -208,7 +208,11 @@ impl<'a> Render<'a> {
|
|||
ScopeDef::ModuleDef(Trait(..)) => CompletionItemKind::Trait,
|
||||
ScopeDef::ModuleDef(TypeAlias(..)) => CompletionItemKind::TypeAlias,
|
||||
ScopeDef::ModuleDef(BuiltinType(..)) => CompletionItemKind::BuiltinType,
|
||||
ScopeDef::GenericParam(..) => CompletionItemKind::TypeParam,
|
||||
ScopeDef::GenericParam(param) => match param {
|
||||
hir::GenericParam::TypeParam(_) => CompletionItemKind::TypeParam,
|
||||
hir::GenericParam::LifetimeParam(_) => CompletionItemKind::LifetimeParam,
|
||||
hir::GenericParam::ConstParam(_) => CompletionItemKind::ConstParam,
|
||||
},
|
||||
ScopeDef::Local(..) => CompletionItemKind::Binding,
|
||||
// (does this need its own kind?)
|
||||
ScopeDef::AdtSelfType(..) | ScopeDef::ImplSelfType(..) => CompletionItemKind::TypeParam,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue