Skip to content

Formatting on save stop when saving again #332

@Kadrian

Description

@Kadrian

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

bug

What is the current/expected behavior?

expected: prettier keeps auto-formatting on save and if it's not successful, it reports an error
actual: prettier formats on auto-save properly when saving for the first time, but then saving a second time, the file isn't formatted anymore, also doesn't do anything when running :Prettier manually and doesn't report any error.

Reproduce:

  • I open a file
  • I create a formatting issue
  • I save
  • Formatting fixes the issue
  • I create the same formatting issue again
  • I save
  • Prettier doesn't format anymore

How can I debug this further?

I'm working mostly in .tsx files (using styled component syntax as well)

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

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

What is your prettier executable path - (output of :PrettierCliPath) ?
/Users/kai/path/to/my/project/node_modules/.bin/prettier

Did this work in previous versions of vim-prettier and/or prettier ?
I don't know, this is the first time I'm using it

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