Skip to content

✨ Minimap #33

Open
Open
@austincondiff

Description

@austincondiff

Description

The Minimap provides a compact visual summary of your code, helping you quickly get a sense of the file’s structure and flow. It appears along the right edge of the editor and lets you instantly jump to different parts of the file by clicking or dragging within the highlighted view area.

Implement the visual display system for the Minimap in the source editor. The Minimap should provide a vertically compressed, non-interactive rendering of the entire file's syntax structure. It visually represents the document using color rectangles, offering users an overview for orientation and navigation.

Requirements

  • Display a vertical Minimap next to the code editor view

  • The Minimap should:

    • Represent the full document using only color rectangles, not text
    • Use syntax highlighting colors from the active theme
    • Dynamically reflect updates in the main editor (insert, delete, scroll, etc.)
  • Scrolling and navigation:

    • Scrolling the editor updates the Minimap viewport
    • Clicking or dragging in the Minimap scrolls the editor to the corresponding position
    • A translucent viewport rectangle highlights the currently visible section of the document
  • Selection handling:

    • If there is no selection, highlight the current line
    • If there is a text selection, highlight the selected range
    • If there are multiple selections, show all selection ranges
  • Integration with editor features:

    • Display search result locations (e.g., from Find/Replace)
    • Display error and warning markers (e.g., from diagnostics)
    • Indicate folded regions if any exist
  • Behavior and customization:

    • The Minimap should be toggleable in editor settings

Implementation Details

  • Rendering should be GPU-accelerated or use offscreen rendering for performance
  • Consider lazy rendering or caching for large files to reduce memory and CPU usage
  • The Minimap should not allow direct text editing
  • Rendering of syntax highlight colors can reuse the existing tokenization model

Additional Context

This feature provides users with a consistent and performant way to understand the overall structure of their code. It is especially helpful in long files and serves as a complement to navigation and issue reporting systems in the editor.

This lays the foundation for future enhancements such as semantic structure previews, bookmarks, and inline annotations inside the Minimap.

Screenshots

Image

Resources

Related Issues

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

🏃‍♂️ In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions