Something to add to the pile of feature requests…
A feature available in the Rust Analyzer extension for VS Code is something they’ve termed “inlay hints.” The feature is essentially inline tokens for types, parameter names, etc. Here’s an example, and you can see the hints in gray text:
These hints aren’t a part of the document and can be toggled on/off. Here’s the same code with hints turned off:
Many modern statically-typed languages (and evolving languages like recent Java versions) allow you to skip specifying types for variable assignments and instead the type is interpreted from the assigned value. While a boon to developers wanting to type less, this can also make types unclear when someone else (or yourself later on) review the code. I can get type information from the language server by hovering my mouse, but it’s not ideal to have to hover over every variable one at a time as you’re following a script.
The Rust Analyzer team thought this was so broadly useful that they are suggesting adding it to the LSP spec. There are certainly unlimited use cases for inline, non-document tokens beyond types. Parameter names, deprecations, whether a new dependency version is available, and on and on. A global toggle means someone can easily stop them from cluttering up their view.
I realize this is an extremely complicated request. I do think it could be really useful to a lot of extensions, though.