aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/completion/src')
-rw-r--r--crates/completion/src/completions.rs10
-rw-r--r--crates/completion/src/render.rs16
2 files changed, 16 insertions, 10 deletions
diff --git a/crates/completion/src/completions.rs b/crates/completion/src/completions.rs
index 162d567d9..75dbb1a23 100644
--- a/crates/completion/src/completions.rs
+++ b/crates/completion/src/completions.rs
@@ -16,7 +16,15 @@ pub(crate) mod mod_;
16 16
17use hir::{ModPath, ScopeDef, Type}; 17use hir::{ModPath, ScopeDef, Type};
18 18
19use crate::{item::Builder, render::*, CompletionContext, CompletionItem}; 19use crate::{
20 item::Builder,
21 render::{
22 const_::render_const, enum_variant::render_enum_variant, function::render_fn,
23 macro_::render_macro, render_field, render_resolution, render_tuple_field,
24 type_alias::render_type_alias, RenderContext,
25 },
26 CompletionContext, CompletionItem,
27};
20 28
21/// Represents an in-progress set of completions being built. 29/// Represents an in-progress set of completions being built.
22#[derive(Debug, Default)] 30#[derive(Debug, Default)]
diff --git a/crates/completion/src/render.rs b/crates/completion/src/render.rs
index b54241d51..1fa02c375 100644
--- a/crates/completion/src/render.rs
+++ b/crates/completion/src/render.rs
@@ -1,12 +1,13 @@
1//! `render` module provides utilities for rendering completion suggestions 1//! `render` module provides utilities for rendering completion suggestions
2//! into code pieces that will be presented to user. 2//! into code pieces that will be presented to user.
3 3
4mod macro_; 4pub(crate) mod macro_;
5mod function; 5pub(crate) mod function;
6pub(crate) mod enum_variant;
7pub(crate) mod const_;
8pub(crate) mod type_alias;
9
6mod builder_ext; 10mod builder_ext;
7mod enum_variant;
8mod const_;
9mod type_alias;
10 11
11use hir::{Documentation, HasAttrs, HirDisplay, Mutability, ScopeDef, Type}; 12use hir::{Documentation, HasAttrs, HirDisplay, Mutability, ScopeDef, Type};
12use ide_db::RootDatabase; 13use ide_db::RootDatabase;
@@ -18,10 +19,7 @@ use crate::{
18 CompletionScore, 19 CompletionScore,
19}; 20};
20 21
21pub(crate) use crate::render::{ 22use crate::render::{enum_variant::render_enum_variant, function::render_fn, macro_::render_macro};
22 const_::render_const, enum_variant::render_enum_variant, function::render_fn,
23 macro_::render_macro, type_alias::render_type_alias,
24};
25 23
26pub(crate) fn render_field<'a>( 24pub(crate) fn render_field<'a>(
27 ctx: RenderContext<'a>, 25 ctx: RenderContext<'a>,