mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Merge pull request #2297 from kiljacken/master
Add fancy truncation of type hints.
This commit is contained in:
commit
eec68e6f45
10 changed files with 134 additions and 35 deletions
|
@ -344,8 +344,14 @@ impl Analysis {
|
|||
}
|
||||
|
||||
/// Returns a list of the places in the file where type hints can be displayed.
|
||||
pub fn inlay_hints(&self, file_id: FileId) -> Cancelable<Vec<InlayHint>> {
|
||||
self.with_db(|db| inlay_hints::inlay_hints(db, file_id, &db.parse(file_id).tree()))
|
||||
pub fn inlay_hints(
|
||||
&self,
|
||||
file_id: FileId,
|
||||
max_inlay_hint_length: Option<usize>,
|
||||
) -> Cancelable<Vec<InlayHint>> {
|
||||
self.with_db(|db| {
|
||||
inlay_hints::inlay_hints(db, file_id, &db.parse(file_id).tree(), max_inlay_hint_length)
|
||||
})
|
||||
}
|
||||
|
||||
/// Returns the set of folding ranges.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue