sublime-fmt icon indicating copy to clipboard operation
sublime-fmt copied to clipboard

documentation update for dprint (javascript)

Open basaran opened this issue 4 years ago • 2 comments

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"
        }
    ],
}

basaran avatar May 17 '21 20:05 basaran

Apologies but I totally forgot about these. Will try to get around to it this week.

mitranim avatar Nov 01 '21 06:11 mitranim

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.

basaran avatar Nov 01 '21 12:11 basaran