CodeEditSourceEditor icon indicating copy to clipboard operation
CodeEditSourceEditor copied to clipboard

✨ Minimap

Open austincondiff opened this issue 2 years ago • 8 comments

Overview

This view represents your code in a smaller form. The VSCode documentation says in best...

A Minimap (code outline) gives you a high-level overview of your source code, which is useful for quick navigation and code understanding. A file's minimap is shown on the right side of the editor. You can click or drag the shaded area to quickly jump to different sections of your file.

image

Tip: You can move the minimap to the left hand side or disable it completely by respectively setting "editor.minimap.side": "left" or "editor.minimap.enabled": false in your user or workspace settings.

Resources

austincondiff avatar Mar 31 '22 18:03 austincondiff

This is do able just not sure where to do it or where to add it in the codebase

nanashili avatar Apr 02 '22 12:04 nanashili

Actually I'd prefer the minimap like Xcode rather than VScode. The minimap of Xcode contains more useful features and looks cleaner and much more beautiful. It will definitely take more work to make one like that, but I believe you'll love it too.

Yellow-GGG avatar Oct 20 '22 17:10 Yellow-GGG

@Yellow-GGG I agree the Xcode minimap is far more useful; however at the same time I think it may be wiser to ship a minimap with minimal functionality and then add complexity in future releases.

tjkohli avatar Nov 23 '22 08:11 tjkohli

@tjkohli I completely agree. We need to get something in place first, then we can iterate and improve.

austincondiff avatar Nov 23 '22 18:11 austincondiff

Hey @austincondiff, could you assign this to me? I already got some of the CodeEditorView code working:

Image

Eliulm avatar Apr 02 '23 12:04 Eliulm

This is the current state of the minimap. Still a lot of bugs to fix, but I am getting there slowly...

https://user-images.githubusercontent.com/82230675/231145498-c3f3ad40-2a18-4034-9e3c-c883e0843a42.mov

@thecoolwinter I need to set the bounds of the visibleRange in STTextview+VisibleRange to the visibleBounds of the MinimapView conditionally. How should I rewrite the code, so that I can pass props to visibleTextRange variable?

Eliulm avatar Apr 11 '23 11:04 Eliulm

Looks great! Where are we with this?

austincondiff avatar Apr 29 '23 17:04 austincondiff

Unfortunately, I have had little time recently, since I am currently working on my degree.

I have decided that I am going re-implement the minimap in textkit2, instead of textkit1, since the resizing was very laggy. I have also encountered multiple issues like #184, which need to be resolved first, so that the minimap can work properly.

Eliulm avatar Apr 30 '23 18:04 Eliulm