Skip to content

Outline View

An outline is a summary of the structure of a file, shown in a separate view next to a textual editor. An outline is created by a Stratego strategy, but is configured in an ESV file under the views section:


  outline view: $Strategy
    expand to level: $Int

The Stratego strategy specified as $Strategy must have the following signature:


    Node : Label * Children -> Node


    (node, position, ast, path, project-path) -> outline

Where the input is the default tuple used for builders, and the result is a list of Node terms, each carrying a label and a (possibly empty) list of child nodes.

Preserve origins on the node's label to allow navigating to the corresponding code from the outline.

For example:


  outline view: editor-outline
    expand to level: 3

This configures the editor-outline Stratego strategy to be used to create outlines, and that outline nodes should be expanded 3 levels deep by default.

Last update: May 24, 2024
Created: May 24, 2024