vim-prettier icon indicating copy to clipboard operation
vim-prettier copied to clipboard

Folds are broken after saving a JavaScript file

Open pipoprods opened this issue 4 years ago • 0 comments

Do you want to request a feature or report a bug?

A bug

What is the current/expected behavior?

Folds should remain well placed

What version of vim-prettier are you using - (output of :PrettierVersion) ?

1.0.0-beta, commit 37600923a25dded35bbf74c3f682d9807ef0b0ce

What version of prettier are you using - (output of :PrettierCliVersion) ?

2.3.0

What is your prettier executable path - (output of :PrettierCliPath) ?

prettier (actually ~/.nvm/versions/node/v16.1.0/bin/prettier)

Did this work in previous versions of vim-prettier and/or prettier ?

Don't know

When saving a file whose formatting is already correct, folds are moved one line below.

Before: 2021-05-19_15-47

After: 2021-05-19_15-48

If the file is not properly formatted, then it gets auto-formatted and folds are keps at their right place.

JS folding is configured this way:

let javaScript_fold=1
set foldmethod=syntax

pipoprods avatar May 19 '21 13:05 pipoprods