MunifTanjim / prettier.nvim

Prettier plugin for Neovim's built-in LSP client.
MIT License
289 stars 9 forks source link

Running prettier removes EOF blank line #30

Closed sentientmachin3 closed 1 year ago

sentientmachin3 commented 1 year ago

Running prettier as a command (with :Prettier) removes the new line at the end of the file. This looks odd to me because by default prettier should add it no matter what, and from VSCode the line is added regularly.

My config:

require("prettier").setup({
    check_package_json = true,
    config_precedence = "prefer-file",
})

Installed via Lazy.

MunifTanjim commented 1 year ago

the file. This looks odd to me because by default prettier should add it no matter what

What happens when you manually run prettier on that file?

What is the version of prettier you're using?

What is your prettier config?

Are you sure this is caused by prettier and not some other plugins that runs when the file is saved?

sentientmachin3 commented 1 year ago

I just discovered this isn't an issue related to prettier, opening the file in VsCode shows a new line, opening with Vim, or cat-ting it, or less-ing it to the terminal does not show said line.