Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation update for dprint (javascript) #4

Open
basaran opened this issue May 17, 2021 · 2 comments
Open

documentation update for dprint (javascript) #4

basaran opened this issue May 17, 2021 · 2 comments

Comments

@basaran
Copy link

basaran commented May 17, 2021

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 basaran closed this as completed Nov 1, 2021
@mitranim
Copy link
Owner

mitranim commented Nov 1, 2021

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

@mitranim mitranim reopened this Nov 1, 2021
@basaran
Copy link
Author

basaran commented Nov 1, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants