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

Folds modified after formatting #174

Open
nullromo opened this issue Feb 29, 2024 · 0 comments
Open

Folds modified after formatting #174

nullromo opened this issue Feb 29, 2024 · 0 comments

Comments

@nullromo
Copy link

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.

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

No branches or pull requests

1 participant