You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/ra_ide/src/inlay_hints.rs
+20-2Lines changed: 20 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,3 @@
1
-
//! This module defines multiple types of inlay hints and their visibility
2
-
3
1
use hir::{Adt,HirDisplay,Semantics,Type};
4
2
use ra_ide_db::RootDatabase;
5
3
use ra_prof::profile;
@@ -39,6 +37,26 @@ pub struct InlayHint {
39
37
publabel:SmolStr,
40
38
}
41
39
40
+
// Feature: Inlay Hints
41
+
//
42
+
// rust-analyzer shows additional information inline with the source code.
43
+
// Editors usually render this using read-only virtual text snippets interspersed with code.
44
+
//
45
+
// rust-analyzer shows hits for
46
+
//
47
+
// * types of local variables
48
+
// * names of function arguments
49
+
// * types of chained expressions
50
+
//
51
+
// **Note:** VS Code does not have native support for inlay hints https://github.com/microsoft/vscode/issues/16221[yet] and the hints are implemented using decorations.
52
+
// This approach has limitations, the caret movement and bracket highlighting near the edges of the hint may be weird:
0 commit comments