Closed jacksonludwig closed 3 years ago
Have you installed and set up null-ls? Formatting and ESLint integrations now depend on it, and it requires a tiny bit of extra setup (see the formatting section of this project's README).
From your config, it seems possible that you're formatting the file with tsserver
itself (the README also describes how to disable that). I was able to replicate the behavior you're describing by copy-pasting your setup and disabling null-ls, so I wonder if that's the issue.
Yep you're correct, with null-ls installed formatting does work. My mistake I did not realize the readme was updated. Thanks.
No worries and thanks for the patience with the breaking change!
Using
vim.lsp.buf.formatting_sync()
onBufWritePost
, it would be expected that the buffer would format and then save the changes.However, I noticed that although the file is formatted correctly and neovim reports that the file is saved, reopening the file shows that the formatting changes were not actually saved. This did not occur with the earlier implementation of this plugin when it had a
format_on_save
option.To reproduce, open a file that needs to be fixed by prettier, save it, and then do
:e <filename>
and observe that the format was not saved.This is the config I used: