Skip to content
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

Folding misbehaves in version 0.14.0 #400

Closed
1 of 4 tasks
benbridts opened this issue Jan 29, 2021 · 2 comments · Fixed by #402 or #425
Closed
1 of 4 tasks

Folding misbehaves in version 0.14.0 #400

benbridts opened this issue Jan 29, 2021 · 2 comments · Fixed by #402 or #425
Assignees
Labels
Milestone

Comments

@benbridts
Copy link

Describe the bug

When using this code, folding does not work as expected:

FirstDict:
  FirstDictFirstKey:
    SomeList:
      - foo
SecondDict:
  SecondDictFirstKey: foo

Expected Behavior

When clicking the carret before FirstDictFirstKey, only the things under FirstDictFirstKey should be folded

Current Behavior

One line extra collapses. SecondDict will dissapear.

image

Steps to Reproduce

  1. Use the provided code
  2. Fold FirstDictFirstKey

Note: Removing the list from the file makes this behavior stop.

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)
@JPinkney JPinkney added the bug label Jan 30, 2021
@evidolob evidolob self-assigned this Feb 1, 2021
@evidolob evidolob added this to the 0.15.0 milestone Feb 4, 2021
@evidolob evidolob mentioned this issue Feb 4, 2021
@farski
Copy link

farski commented Mar 8, 2021

Folding is still not working as I would expect. Consider this example:

image

If L328 gets folded, I would expect to see an empty newline and the # Slow API handler comment line.

image

Folding eats both of those lines. This is primarily an issue for the comments, since it hides a lot of comments that are used to create some organizational separation within files.

@evidolob evidolob reopened this Mar 9, 2021
@evidolob
Copy link
Collaborator

evidolob commented Mar 9, 2021

Yeh, I will disable folding range provider, at least until we not switch to new parser with can provide AST node for comments - #421

evidolob added a commit to evidolob/yaml-language-server that referenced this issue Mar 16, 2021
evidolob added a commit that referenced this issue Mar 17, 2021
Signed-off-by: Yevhen Vydolob <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants