On , I learnt ...

dprint can be used to speed up Prettier

dprint is a formatting platform written in Rust. It supports a Prettier plugin that can give a big performance increase via its incremental formatting functionality.

See this post for how to set-up locally.

Since I only use Prettier to format markdown, I have a ~/.dprint.json file with contents:

  "includes": ["**/*.{md,markdown}"],
  "excludes": [],
  "plugins": [

To use this as a formatter in Vim, I set dprint as an Ale fixer for markdown buffers:

" ~/.vim/after/ftplugin/markdown.vim

let b:ale_fixers = ['dprint']