Skip to content

Minimap: Render search result decorations #75216

Closed

Description

Support rendering text decorations in the minimap, beginning with search results. We can add a new option to decorations, similar to overviewRuler in IModelDecorationOptions:

/**
 * Options for rendering a model decoration in the overview ruler.
 */
export interface IModelDecorationOverviewRulerOptions {
	/**
	 * CSS color to render in the overview ruler.
	 * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry
	 */
	color: string | ThemeColor | undefined;
	/**
	 * CSS color to render in the overview ruler.
	 * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry
	 */
	darkColor?: string | ThemeColor;
	/**
	 * The position in the overview ruler.
	 */
	position: OverviewRulerLane;
}

The new optional minimap property could look like:

/**
 * Options for rendering a model decoration in the overview ruler.
 */
export interface IModelDecorationMinimapOptions {
	/**
	 * CSS color to render in the minimap.
	 * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry
	 */
	color: string | ThemeColor | undefined;
	/**
	 * CSS color to render in the minimap.
	 * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry
	 */
	darkColor?: string | ThemeColor;
	/**
	 * The position in the minimap.
	 */
	position: MinimapPosition; // 'Gutter' or 'Text', i.e. either drawn on the left side of the minimap or using the decoration position to draw it on a specific text range
}

The find widget can then set this property for its decorations, and the minimap can read the decorations from its text model.

Activity

  1. added
    feature-request
    editor-minimap
    on Jun 10, 2019
  2. added a commit that references this issue on Jun 21, 2019
    f7930a5
  3. locked and limited conversation to collaborators on Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

editor-minimapfeature-requeston-testplan

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions