diff options
author | Aleksey Kladov <[email protected]> | 2019-11-20 05:38:25 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-20 05:38:25 +0000 |
commit | eec68e6f451ee7675ce2cb29b696df091e6aed13 (patch) | |
tree | f83c828be31f5ac3950bf41c027a30365cfc7bd6 /crates/ra_ide_api/src/lib.rs | |
parent | 0e61ba3750df7e3e19eda21b6486bf70d6dffc72 (diff) | |
parent | bf5ac4fe3952ee0db9fe18a185e39a209c58e79b (diff) |
Merge pull request #2297 from kiljacken/master
Add fancy truncation of type hints.
Diffstat (limited to 'crates/ra_ide_api/src/lib.rs')
-rw-r--r-- | crates/ra_ide_api/src/lib.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs index 57ed97147..62ad996bc 100644 --- a/crates/ra_ide_api/src/lib.rs +++ b/crates/ra_ide_api/src/lib.rs | |||
@@ -344,8 +344,14 @@ impl Analysis { | |||
344 | } | 344 | } |
345 | 345 | ||
346 | /// Returns a list of the places in the file where type hints can be displayed. | 346 | /// Returns a list of the places in the file where type hints can be displayed. |
347 | pub fn inlay_hints(&self, file_id: FileId) -> Cancelable<Vec<InlayHint>> { | 347 | pub fn inlay_hints( |
348 | self.with_db(|db| inlay_hints::inlay_hints(db, file_id, &db.parse(file_id).tree())) | 348 | &self, |
349 | file_id: FileId, | ||
350 | max_inlay_hint_length: Option<usize>, | ||
351 | ) -> Cancelable<Vec<InlayHint>> { | ||
352 | self.with_db(|db| { | ||
353 | inlay_hints::inlay_hints(db, file_id, &db.parse(file_id).tree(), max_inlay_hint_length) | ||
354 | }) | ||
349 | } | 355 | } |
350 | 356 | ||
351 | /// Returns the set of folding ranges. | 357 | /// Returns the set of folding ranges. |