prettierd
prettierd copied to clipboard
Prettierd requires manual restart when prettier version changes
When I update prettier version in my repo, I need to manually kill prettierd process to have it use the new version.
Would be nice if it could detect that the version loaded in cache is not the same as the installed.
Or at least, document this. Because it is not obvious
Steps to reproduce
npm i -D [email protected]- See that prettierd uses this version to format
npm i -D [email protected]npx prettier -c [file]- There should be warning if you have things that are formatted differently in 2.3
- prettierd doesn't format with 2.3 even when you restart neovim
killall prettierd- Now it formats correctly
Still not sure what's the best way to detect a change, but 0.20.0 at least includes a command to clear the cache (prettierd flush-cache), so you won't need to restart anymore.
Restarting with prettierd restart did not work for me. I really needed to flush-cache and restart to make the changes apply. Thanks @fsouza for pointing this out.