sublime-fmt
sublime-fmt copied to clipboard
documentation update for dprint (javascript)
Hello,
Here's the recipe to format js files with the new prettier alternative called dprint. Written with rust, it's fast.
install dprint
cargo install dprint
in your project folder, init dprint
dprint --init
update sublime-fmt rule
{
"rules": [
{
"cmd": [
"$HOME/.cargo/bin/dprint",
"fmt",
"--stdin",
"$file"
],
"selector": "source.js"
}
],
}
Apologies but I totally forgot about these. Will try to get around to it this week.
no problems, I was just trying to cleanup my issues list :) Thank you for fmt. I have been using it in places where LSP could not reach.
Also, dprint had some nice updates for both markdown, and prettier integrations. Between fmt and a global dprint config, they will solve majority of sublime's formatting troubles.