Skip to content

Folds modified after formatting #174

@nullromo

Description

@nullromo

Summary

After coc-prettier is triggered, the folding in the file will change

Steps to Reproduce

  1. Start with the following file:
export const f = () => {
    const x = () => {
        console.log('hello');
    };

    return 'a';
};
  1. :set foldmethod=indent
  2. :set foldlevel=99
  3. 2GJJ
  4. Trigger coc-prettier
  5. Notice that it looks like the original. This is the expected behavior. ✅
  6. zM2GzO
  7. 2GJJ
  8. Trigger coc-prettier
  9. Notice that the function is now folded. This is not what I want ❌

Ideal Solution

When formatting with Prettier, coc-prettier should not change any of the folding. It should not open or close any folds.

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