feature: add option to configure overviewRuler#223118
Open
SimonSiefke wants to merge 24 commits intomicrosoft:mainfrom
Open
feature: add option to configure overviewRuler#223118SimonSiefke wants to merge 24 commits intomicrosoft:mainfrom
SimonSiefke wants to merge 24 commits intomicrosoft:mainfrom
Conversation
Member
|
CI is failing |
|
@hediet any progress about this highly requested feature that has a PR? I believe CI was fixed |
Contributor
There was a problem hiding this comment.
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
EditorOptionenum. This will break compilation and can lead to incorrect numeric IDs for options. Resolve the conflict and ensure the enum ordering/values stay aligned withsrc/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) vsIModelDecoration(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
overviewRulerEnabledis'off',getAllOverviewRulerDecorationsstill callsmodel.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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #85418
Demo:
overview-ruler.mp4
Changes:
Adds an option
editor.overviewRulerEnabledto configure whether or not overviewRuler decorations are enabled:on: Show all overviewRuler decorationsminmal: Show only search results, infos, warnings and errorsoff: Don't show overviewRuler decorations