The VS Code 1.70 launch notes share a brand new nifty experimental editor function – sticky scroll!
Discover and allow “Sticky Scroll” in your VS Code settings.
Or add the next line to your settings
:
{
"editor.experimental.stickyScroll.enabled": true
}
And now, see your JavaScript operate signatures stick on the highest.
You would possibly argue now that for JavaScript it is an pointless editor function as a result of if you happen to write clear code with quick features, you will not want it. However a) I am all the time completely happy about fairly editor UI options and b) it really works for different file codecs equivalent to json
, css
or yaml
, too.
After sharing this function on Twitter, Elio Struyf identified which you could additionally configure the sticky aspect’s background colour. 🎉
{
"workbench.colorCustomizations": {
"editorStickyScroll.background": "#D44",
"editorStickyScrollHover.background": "#A00"
}
}
It’d want a little bit tweaking to make it work together with your colour theme, although. 🙈
Additionally, if you wish to restrict the variety of sticky traces use editor
. The setting’s 5 by default.