-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add setting for minimap on active editor only #31390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add setting for minimap on active editor only #31390
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I am not sure whether this should be part of the visibility enum or rather a separate setting.
I do not really see why OnActiveBuffer
and Auto
should exclude one another, since there might be cases where one would also want the minimap to hide on the currently active editor after the given Auto
delay. Feels like we are mixing the question of "When to show the minimap" with "Where to show the minimap" to me and I am not sure this scales well if we add this configuration to the ShowMinimap
enum
@MrSubidubi Good points! I see three possible alternatives:
Or, of course, we could leave it as is and not allow the user to choose where to show the minimap. |
Putting it within the Personally, I would also like something like I also think allowing users to select where to show the minimap overall sounds reasonable - it does take up some screen space and showing the minimap only in the currently active editor could reduce visual clutter for users that want a less busy UI. |
I was actually thinking on something like this: /// Where to show the minimap in the editor.
///
/// Default: all
#[derive(Copy, Clone, Debug, Default, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
#[serde(rename_all = "snake_case")]
pub enum MinimapDisplayScope {
/// Show on all open panes.
#[default]
AllPanes,
/// Show the minimap on the focused pane only.
FocusedPane,
} And put the config on |
06778ed
to
a8ecab4
Compare
I'm noticing a flickering when splitting panes. I'll see what I can do about it 2025-05-27.16-58-48.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea, and thank you for spotting the flickering: let's straighten out the rendering conditions and see if the flickering situation improves.
a8ecab4
to
95c02a2
Compare
d853c2e
to
ed00696
Compare
ed00696
to
da06db8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turned out to be much simpler code in the end, nice.
Thank you!
Follow-up of #31390 Release Notes: - N/A
Release Notes:
settings.json
:Preview:
Only the active editor (left) displays the minimap.