Skip to content

feature: add option to configure overviewRuler#223118

Open
SimonSiefke wants to merge 24 commits intomicrosoft:mainfrom
SimonSiefke:feature/overview-ruler-option
Open

feature: add option to configure overviewRuler#223118
SimonSiefke wants to merge 24 commits intomicrosoft:mainfrom
SimonSiefke:feature/overview-ruler-option

Conversation

@SimonSiefke
Copy link
Copy Markdown
Contributor

Fixes #85418

Demo:

overview-ruler.mp4

Changes:

Adds an option editor.overviewRulerEnabled to configure whether or not overviewRuler decorations are enabled:

  • on: Show all overviewRuler decorations
  • minmal: Show only search results, infos, warnings and errors
  • off: Don't show overviewRuler decorations

@hediet hediet modified the milestones: August 2024, September 2024 Aug 29, 2024
@hediet hediet removed this from the September 2024 milestone Sep 10, 2024
@hediet
Copy link
Copy Markdown
Member

hediet commented Sep 10, 2024

CI is failing

@Destroy666x
Copy link
Copy Markdown

@hediet any progress about this highly requested feature that has a PR? I believe CI was fixed

Copilot AI review requested due to automatic review settings March 13, 2026 09:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new editor option to control whether the editor overview ruler renders decorations, addressing requests to reduce/disables the “busy” right-side overview ruler visuals.

Changes:

  • Introduces overviewRulerEnabled ('on' | 'minimal' | 'off') as an editor option (and Monaco API surface) to control overview ruler decoration rendering.
  • Filters overview ruler decorations in the view model based on the new option.
  • Adjusts overview ruler rendering (border/cursor visibility) when the option is 'minimal' or 'off'.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/vs/monaco.d.ts Exposes the new option on Monaco types and editor option IDs.
src/vs/editor/common/viewModel/viewModelImpl.ts Filters overview ruler decorations based on the configured mode.
src/vs/editor/common/standalone/standaloneEnums.ts Updates standalone editor option IDs to include the new option.
src/vs/editor/common/config/editorOptions.ts Registers the new editor option and adds it to the options enum/interface.
src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts Adjusts border/cursor rendering behavior based on the new mode.
Comments suppressed due to low confidence (3)

src/vs/editor/common/standalone/standaloneEnums.ts:186

  • The file contains unresolved git merge-conflict markers in the EditorOption enum. This will break compilation and can lead to incorrect numeric IDs for options. Resolve the conflict and ensure the enum ordering/values stay aligned with src/vs/editor/common/config/editorOptions.ts.
	allowOverflow = 4,
	allowVariableLineHeights = 5,
	allowVariableFonts = 6,
	allowVariableFontsInAccessibilityMode = 7,
	ariaLabel = 8,
	ariaRequired = 9,

src/vs/editor/common/viewModel/viewModelImpl.ts:27

  • There are unresolved merge-conflict markers in the import list. As-is this won’t compile, and the two sides also differ on importing TextDirection (used later in this file) vs IModelDecoration (used by the new filtering helper). Resolve the conflict and include all required imports without the conflict markers.
import { EndOfLinePreference, IAttachedView, ICursorStateComputer, IGlyphMarginLanesModel, IIdentifiedSingleEditOperation, type IModelDecoration, ITextModel, PositionAffinity, TrackedRangeStickiness, TextDirection } from '../model.js';
import { IActiveIndentGuideInfo, BracketGuideOptions, IndentGuide } from '../textModelGuides.js';
import { ModelDecorationMinimapOptions, ModelDecorationOptions, ModelDecorationOverviewRulerOptions } from '../model/textModel.js';
import * as textModelEvents from '../textModelEvents.js';
import { TokenizationRegistry } from '../languages.js';

src/vs/editor/common/viewModel/viewModelImpl.ts:944

  • When overviewRulerEnabled is 'off', getAllOverviewRulerDecorations still calls model.getOverviewRulerDecorations(...) and then immediately discards the result. That traversal can be relatively expensive in heavily-decorated editors, and the new setting is a good opportunity to skip the work entirely. Consider checking the option up-front and returning [] before querying decorations when the setting is 'off' (and potentially before filtering when 'minimal').
		for (const decoration of filteredDecorations) {
			const decorationOptions = <ModelDecorationOptions>decoration.options;
			const opts = decorationOptions.overviewRuler;
			if (!opts) {
				continue;

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/vs/editor/common/config/editorOptions.ts
Comment thread src/vs/editor/common/viewModel/viewModelImpl.ts
Comment thread src/vs/editor/common/config/editorOptions.ts Outdated
Comment thread src/vs/editor/common/viewModel/viewModelImpl.ts
SimonSiefke and others added 2 commits March 13, 2026 11:02
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable overview ruler entirely

8 participants