Optional minimap hover preview #61198
pixel365
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to propose an optional hover preview for the editor minimap.
The idea is to let users inspect nearby code before jumping to a location from the minimap. In large files, the minimap can be useful for quick navigation, but it can also be difficult to identify the exact area before clicking. A small preview next to the minimap can make that interaction more predictable.
I opened a draft PR with a working prototype here:
#61195
Demo
1.webm
2.webm
How it works
When enabled, hovering over the minimap shows a small code preview next to it.
The preview:
The feature is disabled by default.
Settings
The prototype currently adds these settings:
hover_preview enables the feature. Default:
false.hover_preview_lines controls how many lines are shown in the preview. Default:
9,hover_preview_width_columns controls the preview width. Default:
80.The settings apply immediately when changed.
Why this may be useful
This is mainly intended for navigating large files.
The minimap gives a compact overview, but it can be hard to know whether a particular point in the minimap is the section you want. The preview gives quick visual confirmation before clicking.
This can make the existing minimap interaction more deliberate: hover to inspect the target area, then click if it is the location you want.
Related minimap navigation discussion
There is also a related discussion about minimap click behavior:
#61181
And a closed PR that explored changing minimap click navigation:
#61174
I think hover preview is useful independently because it does not require changing the current click behavior. But it could also complement a broader future direction where minimap navigation modes are configurable, for example keeping the current behavior as default while offering an alternative scrollbar-like mode.
Open questions
Beta Was this translation helpful? Give feedback.
All reactions