diff options
author | Lukas Wirth <[email protected]> | 2021-01-20 17:38:12 +0000 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-01-20 17:39:46 +0000 |
commit | f2cb7dbcb71d81336c95dc7ae1301ba2a79ef707 (patch) | |
tree | c17a9cf589910137b5388fc22856c991a5ec0a31 /crates/completion/src/render/macro_.rs | |
parent | 563a175fdb9073a548fc2e161d5de0a093b0d74d (diff) |
Partially unify SymbolKind and CompletionItemKind
Diffstat (limited to 'crates/completion/src/render/macro_.rs')
-rw-r--r-- | crates/completion/src/render/macro_.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/completion/src/render/macro_.rs b/crates/completion/src/render/macro_.rs index f893e420a..a4535786f 100644 --- a/crates/completion/src/render/macro_.rs +++ b/crates/completion/src/render/macro_.rs | |||
@@ -1,11 +1,12 @@ | |||
1 | //! Renderer for macro invocations. | 1 | //! Renderer for macro invocations. |
2 | 2 | ||
3 | use hir::{Documentation, HasSource}; | 3 | use hir::{Documentation, HasSource}; |
4 | use ide_db::SymbolKind; | ||
4 | use syntax::display::macro_label; | 5 | use syntax::display::macro_label; |
5 | use test_utils::mark; | 6 | use test_utils::mark; |
6 | 7 | ||
7 | use crate::{ | 8 | use crate::{ |
8 | item::{CompletionItem, CompletionItemKind, CompletionKind, ImportEdit}, | 9 | item::{CompletionItem, CompletionKind, ImportEdit}, |
9 | render::RenderContext, | 10 | render::RenderContext, |
10 | }; | 11 | }; |
11 | 12 | ||
@@ -41,7 +42,7 @@ impl<'a> MacroRender<'a> { | |||
41 | fn render(&self, import_to_add: Option<ImportEdit>) -> Option<CompletionItem> { | 42 | fn render(&self, import_to_add: Option<ImportEdit>) -> Option<CompletionItem> { |
42 | let mut builder = | 43 | let mut builder = |
43 | CompletionItem::new(CompletionKind::Reference, self.ctx.source_range(), &self.label()) | 44 | CompletionItem::new(CompletionKind::Reference, self.ctx.source_range(), &self.label()) |
44 | .kind(CompletionItemKind::Macro) | 45 | .kind(SymbolKind::Macro) |
45 | .set_documentation(self.docs.clone()) | 46 | .set_documentation(self.docs.clone()) |
46 | .set_deprecated(self.ctx.is_deprecated(self.macro_)) | 47 | .set_deprecated(self.ctx.is_deprecated(self.macro_)) |
47 | .add_import(import_to_add) | 48 | .add_import(import_to_add) |