Merge pull request #2297 from kiljacken/master

Add fancy truncation of type hints.
This commit is contained in:
Aleksey Kladov 2019-11-20 08:38:25 +03:00 committed by GitHub
commit eec68e6f45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 134 additions and 35 deletions

View file

@ -888,7 +888,7 @@ pub fn handle_inlay_hints(
let analysis = world.analysis();
let line_index = analysis.file_line_index(file_id)?;
Ok(analysis
.inlay_hints(file_id)?
.inlay_hints(file_id, world.options.max_inlay_hint_length)?
.into_iter()
.map(|api_type| InlayHint {
label: api_type.label.to_string(),