mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +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
|
@ -134,3 +134,27 @@ fn line_index(db: &dyn LineIndexDatabase, file_id: FileId) -> Arc<LineIndex> {
|
|||
let text = db.file_text(file_id);
|
||||
Arc::new(LineIndex::new(&*text))
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
pub enum SymbolKind {
|
||||
Const,
|
||||
ConstParam,
|
||||
Enum,
|
||||
Field,
|
||||
Function,
|
||||
Impl,
|
||||
Label,
|
||||
LifetimeParam,
|
||||
Local,
|
||||
Macro,
|
||||
Module,
|
||||
SelfParam,
|
||||
Static,
|
||||
Struct,
|
||||
Trait,
|
||||
TypeAlias,
|
||||
TypeParam,
|
||||
Union,
|
||||
ValueParam,
|
||||
Variant,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue