rust-analyzer recently switched to using LSP inlay hints, which render using vscode's inlay hint renderer. with this involves a change in design, and most notably, an introduction of some slight padding around the inlay hint.
in rust-analyzer, inlay hints where it make sense try to look like the actual inferred type definition in many cases, for example:
let i = String::from("hello");
Might insert the following inlay hint:
let i: String = String::from("hello");
^^^^^^^^
In vscode today, however, there is some awkward padding around this:

In an older rust-analyzer build, this used to look like (taken from r-a's github page which still shows the old style.)

An effort can be made to try to reduce the visual impact of the inlay hints by setting editorInlayHint.background and editorInlayHint.foreground - however, this still does not solve the issue of the awkward padding box that is now hidden:

This suffers from odd padding on the left/right side, and the bottom.
It would be really much appreciated if vscode could support a "compact" display style option which would remove the padding, border radius and vertical alignment.
The "compact" version might look like this (still probably a pixel or two off, crafted in mspaint..., but should be enough to show the idea)

I would be happy to implement this feature too if pointed in the right direction!
rust-analyzer recently switched to using LSP inlay hints, which render using vscode's inlay hint renderer. with this involves a change in design, and most notably, an introduction of some slight padding around the inlay hint.
in rust-analyzer, inlay hints where it make sense try to look like the actual inferred type definition in many cases, for example:
Might insert the following inlay hint:
In vscode today, however, there is some awkward padding around this:
In an older rust-analyzer build, this used to look like (taken from r-a's github page which still shows the old style.)
An effort can be made to try to reduce the visual impact of the inlay hints by setting
editorInlayHint.backgroundandeditorInlayHint.foreground- however, this still does not solve the issue of the awkward padding box that is now hidden:This suffers from odd padding on the left/right side, and the bottom.
It would be really much appreciated if vscode could support a "compact" display style option which would remove the padding, border radius and vertical alignment.
The "compact" version might look like this (still probably a pixel or two off, crafted in mspaint..., but should be enough to show the idea)
I would be happy to implement this feature too if pointed in the right direction!