Vscode: Minimap: Render git status decorations

Created on 20 Feb 2017  路  20Comments  路  Source: microsoft/vscode

Some ideas:

  • [ ] editor cursor
  • [x] editor selection
  • [ ] change annotations (i.e. git status)
  • [x] find matches

Here is a good mock-up from @jfcartier here:

default

And one from @octref here:

slice

editor-minimap feature-request on-testplan

Most helpful comment

Would also like to see linter errors/warnings:

screen shot 2017-05-04 at 10 42 32

By the way, great job on the minimap. Love this feature. Thanks for the work you put into it!

All 20 comments

Git status could also be helpful.

Visual Studio also displays function scope (bubbles) & nesting (lines), which I use a lot.

image

Since the minimap is character based I'm not sure how this would be implemented though. Perhaps just alternating background colors.

-- Sorry for the English, I used Google Translator --

@alexandrudima Sorry if it's repetitive. Would any of the options below be related to the options it showed above? If not, these options could enter as a feature request or even as an extension (sorry for the English):

1- Find and replace
2- Highlight selected
3- Cursor line
4- Selection
5- git-diff - I think it's your fourth choice, right? :smile:
6- Bookmarks - I do not know if extension that exists is able to use the resources for the minimap. #54

Based on @Tekbr request on my Bookmarks extension, I think the decorator API should be expanded to support minimap. Something similar to OverviewRulerLane and overviewRulerColor in DecorationRenderOptions. Doing so, any extension that supports the decorator API would work _automatically_.

By the way, after turning on _Minimap_ I keep thinking if the _Ruler_ is still necessary. I would say _no_ if the Minimap supported mouse scroll and the decorator API was merged 馃槃

I agree with @alefragnani that I think the ruler is no longer required once many/most of the suggestions in this issue are implemented.

My feeling is that the ruler is essentially just a minimalist version of the mini-map and that both are actually the same thing, just displaying differing amounts of information.

@MartinSGill those are my thought exactly. My feeling is that the minimap should integrate out-of-the-box everything VSCode provides on its core, including highlights, git integration, etc. And at that point its going to be a more verbose version of the enhanced scrollbar, so, you can disable that if you want.

At a minimum it would be nice to get all the features that currently exist in the skinny "git" sidebar integrated into the minimap, and to add a setting to hide the skinny "git" sidebar if you use the minimap. Right now its kind of like there are 2 mini-maps. The original one that is functional, and the new minimap that only shows a high-level view of your code.
screen shot 2017-03-03 at 7 31 48 am

I actually think it would be cool those show both next to each other (as they are now) but just sync their scrolls (currently the minimap shows the whole viewport while the scroll bard has a tiny little "grip") and they do not seem to scroll at the same rate (scrollbar and it's decorators show the whole file in the whole length while the minimap scrolls if a file is long enough)

I like the way the Visual Studio minimap works where the decorators are separate from the code - since it's much easier to spot a coloured block on the side (for example when doing a find) then it is to see a highlight in already-syntax-highlighted code)

But I do not see why we have to copy everything Atom or Sublime does...

@mika76 This has already been proposed in #21849

I summarised the discussions regarding minimap geometry we had within the team in https://github.com/Microsoft/vscode/issues/21849#issuecomment-284703898

@alexandrudima Ah I see - thanks for the notification. Could I propose something then? If there are decorators for the code in the minimap (find for example) could the minimap go into grayscale more or something? I find in Atom and Sublime, when I want to quickly see a highlight in the minimap it always get's lost in the syntax coloring. This is the reason I like the points being on the side of the actual code in VS2015...

Would also like to see linter errors/warnings:

screen shot 2017-05-04 at 10 42 32

By the way, great job on the minimap. Love this feature. Thanks for the work you put into it!

To be useful, minimap has to always show current cursor line and current viewport. Looks like current viewport showing is already implemented in insiders channel, but cursor line is not.

You can use Visual Studio minimap as a reference:
default
(VS 2013)

It replaces plain slider (there is no other slider when minimap is enabled), and always contains whole document without inner scrolling. It also shows errors/warnings/find results/etc.

I only have a 1366x768 screen on my laptop so horizontal space is tight and I'd like to see the ability to combine / replace the scrollbar with the minimap since they both effectively solve the same navigation problem.

Oh please add this in! I would like to second adding in Highlight selected on the minimap and cursor line

I wish it had more options to show / hide. eg.

  • Show only when file has errors
  • Show only when Ctrl key held down for 1 second
  • Show only when mouse hovers over the area it would be shown in

Adding a note here. I think my issue ( https://github.com/Microsoft/vscode/issues/73140 ) may have been incorrectly duped to this one. It is a request for the minimap to reflect text decorators that were applied in the editor, just as the textmate colors are reflected. We would like to do our own colorization, but currently the result are not reflected in the minimap.

As of the latest release (1.39), selection and find matches are shown in the minimap. I'd like to scope this issue down to something specific for easier tracking, so I'm going to repurpose this for git status annotation decorations.

There are some other good ideas in this thread, I think most of them have been covered by other issues:
https://github.com/microsoft/vscode/issues/28653
https://github.com/microsoft/vscode/issues/28310

There didn't seem to be an existing issue tracking error/warning decorations specifically, so I created a new issue for that: https://github.com/microsoft/vscode/issues/82291

It looks like a recent insider build enabled linter warnings/errors in the minimap. That's great for those that want it, but ideally a way to hide them would be nice (at least for linter warnings). Some files have a lot of warnings and they clutter up the minimap. Is that possible?

@dlong500 Currently there isn't a setting for this, but you can change the color of the decorations to match the editor background so that they're not visable:

"workbench.colorCustomizations": {
    "minimap.errorHighlight": "#1e1e1e",
        "minimap.warningHighlight": "#1e1e1e",
}

You can check your current color theme colors by running the Developer: Generate Color Theme from Current Settings command

I was about to say this didn't seem to work, but I searched the repo and it looks like you just added these options about 20 minutes ago? I'll have to wait until the next insider release. Thanks!

Was this page helpful?
0 / 5 - 0 ratings