When using dprint with null-ls to format a file that does not yet exist, there is an issue where the content is not formatted properly. For example, if a new file (e.g. nvim test.ts) is created and some content is edited in it, then a textDocument/formatting request is sent to null-ls before saving the file, the content is not formatted. However, if the file is saved first (:w) and then the formatting request is sent, the content is formatted correctly.
see https://github.com/jose-elias-alvarez/null-ls.nvim/issues/1516
When using dprint with null-ls to format a file that does not yet exist, there is an issue where the content is not formatted properly. For example, if a new file (e.g.
nvim test.ts) is created and some content is edited in it, then atextDocument/formattingrequest is sent to null-ls before saving the file, the content is not formatted. However, if the file is saved first (:w) and then the formatting request is sent, the content is formatted correctly.see https://github.com/jose-elias-alvarez/null-ls.nvim/issues/1516