This package provides the following services:
formatter-jsbeautify package
Formatter for Javascript, HTML, CSS, LESS, SASS.
This Formatter plugin for Formatter provides an interface to js-beautify.
Installation
-
Install js-beautify (
npm install -g js-beautify
) -
Install Formatter package via Atom
- or with
apm install formatter
- or with
-
Install formatter-jsbeautify package via Atom
- or with
apm install formatter-jsbeautify
- or with
Usage
In your source compatible file
Default (inspired from IntelliJ):
'atom-text-editor':
'alt-ctrl-l': 'formatter:format-code'
'alt-cmd-l': 'formatter:format-code'
List of config
-
Path to the exectuable node
- Full path node
-
Path to the exectuable js-beautify
- Full path js-beautify
-
Javascript language
-
Enable formatter for Javascript language (need restart Atom)
-
Arguments passed to the formatter Javascript language
- Example :
-s, 3, -w, 80
- Example :
-
-
HTML language
-
Enable formatter for HTML language (need restart Atom)
-
Arguments passed to the formatter HTML language
- Example :
-s, 8, -w, 160
- Example :
-
-
CSS language
-
Enable formatter for CSS language (need restart Atom)
-
Arguments passed to the formatter CSS language
- Example :
-config=/usr/local/mycfg/css/.jsbeautifyrc
- Example :
-
-
LESS language
-
Enable formatter for LESS language (need restart Atom)
-
Arguments passed to the formatter LESS language
- Example :
-config=/usr/local/mycfg/less/.jsbeautifyrc
- Example :
-
-
SASS language
-
Enable formatter for SASS language (need restart Atom)
-
Arguments passed to the formatter SASS language
- Example :
-config=/usr/local/mycfg/sass/.jsbeautifyrc
- Example :
-
TODO
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request 😄
License
See LICENSE.md