diff options
Diffstat (limited to 'crates/ra_ide_api/src/lib.rs')
-rw-r--r-- | crates/ra_ide_api/src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs index c54d574bc..af163088a 100644 --- a/crates/ra_ide_api/src/lib.rs +++ b/crates/ra_ide_api/src/lib.rs | |||
@@ -38,6 +38,7 @@ mod join_lines; | |||
38 | mod typing; | 38 | mod typing; |
39 | mod matching_brace; | 39 | mod matching_brace; |
40 | mod display; | 40 | mod display; |
41 | mod inlay_hints; | ||
41 | 42 | ||
42 | #[cfg(test)] | 43 | #[cfg(test)] |
43 | mod marks; | 44 | mod marks; |
@@ -64,6 +65,7 @@ pub use crate::{ | |||
64 | display::{file_structure, FunctionSignature, NavigationTarget, StructureNode}, | 65 | display::{file_structure, FunctionSignature, NavigationTarget, StructureNode}, |
65 | folding_ranges::{Fold, FoldKind}, | 66 | folding_ranges::{Fold, FoldKind}, |
66 | hover::HoverResult, | 67 | hover::HoverResult, |
68 | inlay_hints::{InlayHint, InlayKind}, | ||
67 | line_index::{LineCol, LineIndex}, | 69 | line_index::{LineCol, LineIndex}, |
68 | line_index_utils::translate_offset_with_edit, | 70 | line_index_utils::translate_offset_with_edit, |
69 | references::ReferenceSearchResult, | 71 | references::ReferenceSearchResult, |
@@ -396,6 +398,11 @@ impl Analysis { | |||
396 | file_structure(&parse.tree()) | 398 | file_structure(&parse.tree()) |
397 | } | 399 | } |
398 | 400 | ||
401 | /// Returns a list of the places in the file where type hints can be displayed. | ||
402 | pub fn inlay_hints(&self, file_id: FileId) -> Vec<InlayHint> { | ||
403 | inlay_hints::inlay_hints(&self.db.parse(file_id).tree()) | ||
404 | } | ||
405 | |||
399 | /// Returns the set of folding ranges. | 406 | /// Returns the set of folding ranges. |
400 | pub fn folding_ranges(&self, file_id: FileId) -> Vec<Fold> { | 407 | pub fn folding_ranges(&self, file_id: FileId) -> Vec<Fold> { |
401 | let parse = self.db.parse(file_id); | 408 | let parse = self.db.parse(file_id); |