Skip to content

Commit dd685d0

Browse files
bors[bot]SomeoneToIgnoreVeetaha
authored
Merge #5910 #5912
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 <[email protected]> Co-authored-by: Veetaha <[email protected]>
3 parents 7879fc3 + 3ac9732 + de2324d commit dd685d0

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

crates/rust-analyzer/src/handlers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ pub(crate) fn handle_inlay_hints(
10751075
.analysis
10761076
.inlay_hints(file_id, &snap.config.inlay_hints)?
10771077
.into_iter()
1078-
.map(|it| to_proto::inlay_int(&line_index, it))
1078+
.map(|it| to_proto::inlay_hint(&line_index, it))
10791079
.collect())
10801080
}
10811081

crates/rust-analyzer/src/to_proto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ pub(crate) fn signature_help(
294294
}
295295
}
296296

297-
pub(crate) fn inlay_int(line_index: &LineIndex, inlay_hint: InlayHint) -> lsp_ext::InlayHint {
297+
pub(crate) fn inlay_hint(line_index: &LineIndex, inlay_hint: InlayHint) -> lsp_ext::InlayHint {
298298
lsp_ext::InlayHint {
299299
label: inlay_hint.label.to_string(),
300300
range: range(line_index, inlay_hint.range),

editors/code/src/inlay_hints.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ class HintsUpdater implements Disposable {
111111
}
112112

113113
syncCacheAndRenderHints() {
114-
// FIXME: make inlayHints request pass an array of files?
115114
this.sourceFiles.forEach((file, uri) => this.fetchHints(file).then(hints => {
116115
if (!hints) return;
117116

editors/code/src/lsp_ext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* This file mirrors `crates/rust-analyzer/src/req.rs` declarations.
2+
* This file mirrors `crates/rust-analyzer/src/lsp_ext.rs` declarations.
33
*/
44

55
import * as lc from "vscode-languageclient";

0 commit comments

Comments
 (0)