Skip to content

Overlapping folding ranges #316

Closed
@renkun-ken

Description

@renkun-ken

Currently, the folding ranges are created from all multi-line expressions and there could be overlaps in the parse data.

For example, consider the following if-else blocks:

if (x > 0) {
  # hello
  # hello2
  x + 1
} else if (x < -1) {
  x - 1
} else {
  x
}

Collapsing a block could end up hiding the whole expression as demonstrated below:

image

It is a bit non-standard compared with the folding ranges provided by other language servers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions