mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Partially unify SymbolKind and CompletionItemKind
This commit is contained in:
parent
563a175fdb
commit
f2cb7dbcb7
13 changed files with 128 additions and 110 deletions
|
@ -1,11 +1,12 @@
|
|||
//! Renderer for `enum` variants.
|
||||
|
||||
use hir::{HasAttrs, HirDisplay, ModPath, StructKind};
|
||||
use ide_db::SymbolKind;
|
||||
use itertools::Itertools;
|
||||
use test_utils::mark;
|
||||
|
||||
use crate::{
|
||||
item::{CompletionItem, CompletionItemKind, CompletionKind, ImportEdit},
|
||||
item::{CompletionItem, CompletionKind, ImportEdit},
|
||||
render::{builder_ext::Params, RenderContext},
|
||||
};
|
||||
|
||||
|
@ -60,7 +61,7 @@ impl<'a> EnumRender<'a> {
|
|||
self.ctx.source_range(),
|
||||
self.qualified_name.clone(),
|
||||
)
|
||||
.kind(CompletionItemKind::EnumVariant)
|
||||
.kind(SymbolKind::Variant)
|
||||
.set_documentation(self.variant.docs(self.ctx.db()))
|
||||
.set_deprecated(self.ctx.is_deprecated(self.variant))
|
||||
.add_import(import_to_add)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue