Installed Neoformat with Plug in init.vim for Neovim 0.7.2 on Linux Mint 19.3

I can't figure out how to get Neoformat to work with Prettier.

I installed Prettier as a snap package in --devmode, so that it wouldn't be sandboxed.

I installed node package Prettier globally, and it does show up when I list the global packages with npm list -g.

I can use Prettier successfully on the command line.

But in nvim, :Neoformat prettier returns: formatter definition for prettier not found.

What critical step am I missing? Tnx

1 Answer 1


Installing prettier globally is not recommended by the devs.

And at the end of the Config there is an option to enable local prettier installation usage.

let g:neoformat_try_node_exe = 1

To use the globally installed prettier, add the installation directory to the path.

To find the installation path run

npm list -g
  • Thanks for replying, I'll check it out.
    – wayan
    Dec 1, 2022 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.