Skip to content

Overlapping folding ranges #316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
renkun-ken opened this issue Aug 1, 2020 · 0 comments · Fixed by #317
Closed

Overlapping folding ranges #316

renkun-ken opened this issue Aug 1, 2020 · 0 comments · Fixed by #317

Comments

@renkun-ken
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant