foldService top-level property

Facet<({int from, int to})? Function(EditorState state, int lineStart, int lineEnd), List<({int from, int to})? Function(EditorState state, int lineStart, int lineEnd)>> foldService
final

A facet that registers a code folding service.

When called with the extent of a line, such a function should return a foldable range that starts on that line (but continues beyond it), if one can be found.

Implementation

final Facet<
    ({int from, int to})? Function(EditorState state, int lineStart, int lineEnd),
    List<({int from, int to})? Function(EditorState state, int lineStart, int lineEnd)>> foldService = Facet.define(
  FacetConfig(
    combine: (values) => values.toList(),
  ),
);