5910: Fix some typos r=matklad a=SomeoneToIgnore



5912: Remove fixme from inlay_hints.ts r=matklad a=Veetaha

I have reevaluated the fixme and it doesn't seem necessary to pass an array of files
to the inlay hints request.
This will (a) make the request more compilcated (b), make us wait for
inlay hints for `all` active editors resolve at once before rendering and (c)
doesn't seem required because 99% of the time there is a single active editor
in the IDE

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Veetaha <veetaha2@gmail.com>
This commit is contained in:
bors[bot] 2020-08-29 14:52:42 +00:00 committed by GitHub
commit dd685d0d51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 4 deletions

View file

@ -1075,7 +1075,7 @@ pub(crate) fn handle_inlay_hints(
.analysis
.inlay_hints(file_id, &snap.config.inlay_hints)?
.into_iter()
.map(|it| to_proto::inlay_int(&line_index, it))
.map(|it| to_proto::inlay_hint(&line_index, it))
.collect())
}

View file

@ -294,7 +294,7 @@ pub(crate) fn signature_help(
}
}
pub(crate) fn inlay_int(line_index: &LineIndex, inlay_hint: InlayHint) -> lsp_ext::InlayHint {
pub(crate) fn inlay_hint(line_index: &LineIndex, inlay_hint: InlayHint) -> lsp_ext::InlayHint {
lsp_ext::InlayHint {
label: inlay_hint.label.to_string(),
range: range(line_index, inlay_hint.range),

View file

@ -111,7 +111,6 @@ class HintsUpdater implements Disposable {
}
syncCacheAndRenderHints() {
// FIXME: make inlayHints request pass an array of files?
this.sourceFiles.forEach((file, uri) => this.fetchHints(file).then(hints => {
if (!hints) return;

View file

@ -1,5 +1,5 @@
/**
* This file mirrors `crates/rust-analyzer/src/req.rs` declarations.
* This file mirrors `crates/rust-analyzer/src/lsp_ext.rs` declarations.
*/
import * as lc from "vscode-languageclient";