mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Merge #7353
7353: Add LifetimeParam and ConstParam to CompletionItemKind r=matklad a=Veykril Adds `LifetimeParam` and `ConstParam` to `CompletionItemKind` and maps them both to `TypeParam` in the protocol conversion as there are no equivalents, so nothing really changes there. `ConstParam` could be mapped to `Const` I guess but I'm split on whether that would be better? Additions were solely inspired by (the single) test output for const params. Also sorts the variants of `CompletionItemKind` and its to_proto match. Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
0c37b3a0fc
23 changed files with 227 additions and 166 deletions
|
@ -7,6 +7,7 @@ use hir::{AssocItem, Documentation, FieldSource, HasAttrs, HasSource, InFile, Mo
|
|||
use ide_db::{
|
||||
base_db::{FileId, FileRange, SourceDatabase},
|
||||
symbol_index::FileSymbolKind,
|
||||
SymbolKind,
|
||||
};
|
||||
use ide_db::{defs::Definition, RootDatabase};
|
||||
use syntax::{
|
||||
|
@ -18,30 +19,6 @@ use crate::FileSymbol;
|
|||
|
||||
use super::short_label::ShortLabel;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
pub enum SymbolKind {
|
||||
Module,
|
||||
Impl,
|
||||
Field,
|
||||
TypeParam,
|
||||
ConstParam,
|
||||
LifetimeParam,
|
||||
ValueParam,
|
||||
SelfParam,
|
||||
Local,
|
||||
Label,
|
||||
Function,
|
||||
Const,
|
||||
Static,
|
||||
Struct,
|
||||
Enum,
|
||||
Variant,
|
||||
Union,
|
||||
TypeAlias,
|
||||
Trait,
|
||||
Macro,
|
||||
}
|
||||
|
||||
/// `NavigationTarget` represents and element in the editor's UI which you can
|
||||
/// click on to navigate to a particular piece of code.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue