From 563a175fdb9073a548fc2e161d5de0a093b0d74d Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 20 Jan 2021 15:25:34 +0100 Subject: Move SymbolKind to ide_db --- crates/ide_db/src/lib.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'crates/ide_db/src') diff --git a/crates/ide_db/src/lib.rs b/crates/ide_db/src/lib.rs index 118c090d7..ee35d02f5 100644 --- a/crates/ide_db/src/lib.rs +++ b/crates/ide_db/src/lib.rs @@ -134,3 +134,27 @@ fn line_index(db: &dyn LineIndexDatabase, file_id: FileId) -> Arc { let text = db.file_text(file_id); Arc::new(LineIndex::new(&*text)) } + +#[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, +} -- cgit v1.2.3 From f2cb7dbcb71d81336c95dc7ae1301ba2a79ef707 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 20 Jan 2021 18:38:12 +0100 Subject: Partially unify SymbolKind and CompletionItemKind --- crates/ide_db/src/lib.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'crates/ide_db/src') diff --git a/crates/ide_db/src/lib.rs b/crates/ide_db/src/lib.rs index ee35d02f5..6eb34b06b 100644 --- a/crates/ide_db/src/lib.rs +++ b/crates/ide_db/src/lib.rs @@ -137,24 +137,24 @@ fn line_index(db: &dyn LineIndexDatabase, file_id: FileId) -> Arc { #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] pub enum SymbolKind { - Module, - Impl, - Field, - TypeParam, + Const, ConstParam, + Enum, + Field, + Function, + Impl, + Label, LifetimeParam, - ValueParam, - SelfParam, Local, - Label, - Function, - Const, + Macro, + Module, + SelfParam, Static, Struct, - Enum, - Variant, - Union, - TypeAlias, Trait, - Macro, + TypeAlias, + TypeParam, + Union, + ValueParam, + Variant, } -- cgit v1.2.3