Add a right-side fixed per-line annotation gutter API for extensions
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
## Problem
VS Code extensions can display per-line annotations using text editor decorations.
However, `after` decorations are rendered immediately after each line's content,
so their horizontal position varies with line length.
This prevents extensions from presenting a stable right-side column for
per-line metadata, comparable to the existing left editor gutter.
## Use case
IBM i source members traditionally show their six-digit source date in a fixed
column at the far right of every line. The Code for IBM i extension can show
these dates in the left gutter today, but cannot reproduce the familiar
right-side layout without changing document text.
A stable right-side annotation gutter would also be useful for other
fixed-width, mainframe, legacy, and metadata-oriented source formats.
## Proposal
Expose a public extension API for a fixed right-side per-line annotation gutter,
parallel to the existing left-side editor gutter.
The API should allow extensions to:
- Render text or icons per line in a fixed right-side column.
- Define width, alignment, theme-aware colors, hover messages, and commands.
- Respect editor layout features such as word wrap, minimap, diff editors,
sticky scroll, and accessibility settings.
- Avoid altering document content or affecting cursor positions and edits.
## Current workaround
Using `TextEditorDecorationType.after` does not solve this because annotations
follow variable line length rather than occupying a fixed column.
Contributor guide
Assessment
This issue has not been assessed yet.