r/neovim•
getaway-3007

Change default makeprg for `:compiler` commands

Need Help

Hello all, I've recently started using the vim's built-in feature of compiler after I discovered neovim comes with a lot of compilers like jest, eslint, etc.

But the default commands for these expect tools like jest and eslint to be available globally, I would rather like change those commands.

  • Like when I do :compiler jest, we automatically set makeprg=npx jest --no-colors
  • For eslint, if I do ':compiler eslintI want to setmakeprg=eslint_d\ --format\ stylish\ --fix`

As you can see with the eslint example, its not as simple as appending <pwd>/node_modules/.bin to PATH.

Posted Jul 9, 2025, 4:08 AM UTC

64
Loading comments…