yasuyk / web-beautify

Format HTML, CSS and JavaScript/JSON by js-beautify
GNU General Public License v3.0
221 stars 21 forks source link

Add generic `web-beautify-buffer` command and example `use-package` setup #34

Open jguenther opened 6 years ago

jguenther commented 6 years ago

Thanks for this package, it's working great for me!

This PR adds the web-beautify-buffer command, which autodetects which web-beautify-*-buffer function it should run, based on the current buffer's major-mode.

I also updated the documentation and added an example use-package config, which makes the setup for this package nice and clean IMO. Another nice thing is that use-package is smart about autoloading packages for adding hooks or binding commands--no need to manually wrap a bunch of things in with-eval-after-load.

I still need to update the docs in a couple places, but I thought I'd put this PR up first to see if this is something you'd be interested in merging.