I installed the Nix IDE plugin in VS Code, but while scrolling through a Nix file, I noticed that the top of the file followed me around in a small split, which I found annoying and visually messy. I couldn’t find a Nix IDE plugin setting for this, but apparently it’s actually a VS Code setting.

starball@stackoverflow.com

VS Code started changing the default value of the editor.stickyScroll.enabled setting to true in VS Code 1.86 (see the iteration plan and issue ticket #202655).

There are multiple ways to turn it back off:

  • Right click the sticky scroll panel to be prompted to toggle it off
  • OR Run View: Toggle Sticky Scroll in the command palette (corresponding command ID is editor.action.toggleStickyScroll)
  • OR Open your user settings.json file by running Preferences: Open User Settings (JSON) in the command palette, and write "editor.stickyScroll.enabled": false and then save the change

I toggled off the sticky scroll using the command palette, then searched for the setting in Preferences: Open User Settings to disable it permanently. I found the setting labeled as Editor > Sticky Scroll: Enabled, but it was already disabled. It seems that using the command palette changes the setting instead of changing it temporarily for the session, so I didn’t need to do anything else.

I’m not sure why this is the first time I’m running into the issue, but I’m guessing it’s because the other extensions I use don’t tell the editor the information it needs to do the sticky scroll feature.