Atelier Auto Gutter
With line numbers, the glyph margin and folding turned off, VS Code still keeps a 10px column in front of every line. That column is where git draws its added, modified and deleted bars, so it sits empty most of the time.
This extension sets editor.lineDecorationsWidth to 0 while nothing needs that column, and back to your git bar width (scm.diffDecorationsGutterWidth) as soon as something does.
It was made alongside the Atelier Black theme, but it works with any theme.
When the column is shown
The column is shown while any visible editor holds a file that is tracked in a git repository and either:
- has changes git knows about, staged or unstaged, or
- has unsaved edits.
Untracked files, git-ignored files and files outside a repository never get bars, so they never bring the column back. If scm.diffDecorations is set to overview, minimap or none, the column stays hidden.
Good to know
- It changes your user settings. VS Code reads
editor.lineDecorationsWidth but never declares it, so the extension declares it. That way the settings API can write it and settings.json no longer marks it as an unknown setting. A write is skipped while settings.json is open with unsaved changes. If you use Settings Sync, the value syncs too. VS Code has no per-editor gutter width, so a setting is the only lever.
- One value for every editor. With split editors, one changed file shows the column in all of them.
- One value for every window. User settings are shared, so only the focused window updates the value.
- Text shifts sideways by the bar width when the column appears or disappears.
- Other extensions that draw line decorations (in the same column as git) only get room while the column is shown.
- After uninstalling,
editor.lineDecorationsWidth keeps its last value. Delete it from settings.json to get VS Code's default back.
License
MIT