Close #596. Improve README documentation

This commit is contained in:
Glavin Wiechert 2016-07-02 19:28:01 -03:00
parent fdc4eccdbf
commit 41ebc5ed93
44 changed files with 471 additions and 94 deletions

174
README-template.md Normal file
View File

@ -0,0 +1,174 @@
# :lipstick: [{{package.name}}](https://github.com/Glavin001/atom-beautify)
[![Build Status](https://travis-ci.org/Glavin001/atom-beautify.svg?branch=master)](https://travis-ci.org/Glavin001/atom-beautify)
[![Build status](https://ci.appveyor.com/api/projects/status/himnq7tjxl2fdc8u?svg=true)](https://ci.appveyor.com/project/Glavin001/atom-beautify)
[![Gitter chat](https://img.shields.io/badge/gitter-Glavin001%2Fatom--beautify-1dce73.svg)](https://gitter.im/Glavin001/atom-beautify)
[![Paypal Donations](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=X2RK5DKN6YXPJ&lc=CA&item_name=Atom%2dBeautify&item_number=atom%2dbeautify&currency_code=CAD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted)
[![Throughput Graph](https://graphs.waffle.io/Glavin001/atom-beautify/throughput.svg)](https://waffle.io/Glavin001/atom-beautify/metrics)
> {{package.description}}
| Before | After |
| --- | ---- |
| Original HTML | Beautified HTML |
| ![image](https://cloud.githubusercontent.com/assets/1885333/16542239/dd92b766-4076-11e6-8667-0e66cd9f4515.png) | ![image](https://cloud.githubusercontent.com/assets/1885333/16542240/df9bedb6-4076-11e6-98c3-0cbac446583b.png) |
## Table of Contents
- [Installation](#installation)
- [Language Support](#language-support)
- [Usage](#usage)
- [Selection of Code](#selection-of-code)
- [Beautify On Save](#beautify-on-save)
- [Keyboard Shortcut](#keyboard-shortcut)
- [Custom Keyboard Shortcuts](#custom-keyboard-shortcuts)
- [Configuration](#configuration)
- [Simple](#simple)
- [Nested](#nested-recommended)
- [Troubleshooting](#troubleshooting)
- [Contributing](#contributing)
## Installation
Atom Package: https://atom.io/packages/atom-beautify
```bash
apm install atom-beautify
```
Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify`
## Language Support
See [all supported options in the documentation at `docs/options.md`](https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md).
{{language-beautifiers-support languageOptions}}
## Usage
Open the [Command Palette](https://github.com/atom/command-palette), type `Beautify`, and run `Beautify Editor`.
![image](https://cloud.githubusercontent.com/assets/1885333/16542583/1c8d975c-4085-11e6-8307-e35df7430a10.png)
### Selection of Code
It will only beautify selected text if a selection is found -- if not, the whole file will be beautified.
| Selection of Code | Beautify Selection of Code | Beautify Entire File |
| --- | --- | --- |
| Select code in Atom editor | Only that selection is beautified | Without a selection all code is beautified |
| ![image](https://cloud.githubusercontent.com/assets/1885333/16542597/b3f90c84-4085-11e6-8a0e-1b8604ae385c.png) | ![image](https://cloud.githubusercontent.com/assets/1885333/16542598/b5a86b10-4085-11e6-80cf-0afaf1a819c3.png) | ![image](https://cloud.githubusercontent.com/assets/1885333/16542603/b798ec24-4085-11e6-880e-8d3a2741940f.png) |
### Beautify On Save
`Beautify On Save` can be enabled for each language individually.
For example, for language `HTML` go into Atom-Beautify's package settings (`Atom` ➔ `Preferences` ➔ Search for `atom-beautify`), find `HTML`, and toggle the `Beautify On Save` option.
![atom-beautify-setup-beautify-on-save](https://cloud.githubusercontent.com/assets/1885333/16542692/3e781e74-4089-11e6-9cf2-5a19af161093.gif)
### Keyboard Shortcut
You can also type <kbd>Ctrl</kbd>-<kbd>Alt</kbd>-<kbd>B</kbd> as a shortcut or click `Packages > Beautify` in the menu.
#### Custom Keyboard Shortcuts
See [Keymaps In-Depth](https://atom.io/docs/latest/behind-atom-keymaps-in-depth) for more details.
For example:
```coffeescript
'.editor':
'ctrl-alt-b': 'atom-beautify:beautify-editor'
```
## Configuration
Edit your `.jsbeautifyrc` file in any of the following locations:
- Atom Package Settings
`Atom``Preferences` ➔ Search for `atom-beautify`
- Same directory as current file
- Project root
`atom-beautify` will recursively look up from the current file's directory to find `.jsbeautifyrc`.
- Your user's home directory
**Note**: *Comments are supported in `.jsbeautifyrc` thanks to [strip-json-comments](https://github.com/sindresorhus/strip-json-comments).*
See examples of both ways inside [`examples/`](https://github.com/donaldpipowitch/atom-beautify/tree/master/examples)
See [all supported options in the documentation at `docs/options.md`](https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md).
### Simple
See [examples/simple-jsbeautifyrc/.jsbeautifyrc](https://github.com/donaldpipowitch/atom-beautify/blob/master/examples/simple-jsbeautifyrc/.jsbeautifyrc).
```json
{
"indent_size": 2,
"indent_char": " ",
"other": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 2,
"jslint_happy": true,
"indent_handlebars": true
}
```
### Nested (Recommended)
See [examples/nested-jsbeautifyrc/.jsbeautifyrc](https://github.com/donaldpipowitch/atom-beautify/blob/master/examples/nested-jsbeautifyrc/.jsbeautifyrc).
```json
{
"html": {
"brace_style": "collapse",
"indent_char": " ",
"indent_scripts": "normal",
"indent_size": 6,
"max_preserve_newlines": 1,
"preserve_newlines": true,
"unformatted": ["a", "sub", "sup", "b", "i", "u"],
"wrap_line_length": 0
},
"css": {
"indent_char": " ",
"indent_size": 4
},
"js": {
"indent_size": 2,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 2,
"jslint_happy": true
},
"sql": {
"indent_size": 4,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false
}
}
```
## Troubleshooting
Coming soon.
## Contributing
[See all contributors on GitHub](https://github.com/donaldpipowitch/atom-beautify/graphs/contributors).
Please update the [CHANGELOG.md](https://github.com/donaldpipowitch/atom-beautify/blob/master/CHANGELOG.md),
add yourself as a contributor to the [package.json](https://github.com/donaldpipowitch/atom-beautify/blob/master/package.json),
and submit a [Pull Request on GitHub](https://help.github.com/articles/using-pull-requests/).
## License
[MIT](https://github.com/donaldpipowitch/atom-beautify/blob/master/LICENSE.md) © [Glavin Wiechert](https://github.com/Glavin001)

169
README.md
View File

@ -1,4 +1,4 @@
# [atom-beautify](https://github.com/Glavin001/atom-beautify) # :lipstick: [atom-beautify](https://github.com/Glavin001/atom-beautify)
[![Build Status](https://travis-ci.org/Glavin001/atom-beautify.svg?branch=master)](https://travis-ci.org/Glavin001/atom-beautify) [![Build Status](https://travis-ci.org/Glavin001/atom-beautify.svg?branch=master)](https://travis-ci.org/Glavin001/atom-beautify)
[![Build status](https://ci.appveyor.com/api/projects/status/himnq7tjxl2fdc8u?svg=true)](https://ci.appveyor.com/project/Glavin001/atom-beautify) [![Build status](https://ci.appveyor.com/api/projects/status/himnq7tjxl2fdc8u?svg=true)](https://ci.appveyor.com/project/Glavin001/atom-beautify)
@ -7,10 +7,29 @@
[![Throughput Graph](https://graphs.waffle.io/Glavin001/atom-beautify/throughput.svg)](https://waffle.io/Glavin001/atom-beautify/metrics) [![Throughput Graph](https://graphs.waffle.io/Glavin001/atom-beautify/throughput.svg)](https://waffle.io/Glavin001/atom-beautify/metrics)
> [Beautify](https://github.com/beautify-web/js-beautify) > Beautify HTML, CSS, JavaScript, PHP, Python, Ruby, Java, C, C++, C#, Objective-C, CoffeeScript, TypeScript, Coldfusion, SQL, and more in Atom
HTML (including [Handlebars](http://handlebarsjs.com/)),
CSS (including [Sass](http://sass-lang.com/) and [Less](http://lesscss.org/)), | Before | After |
JavaScript, and much more in Atom. | --- | ---- |
| Original HTML | Beautified HTML |
| ![image](https://cloud.githubusercontent.com/assets/1885333/16542727/db52adc6-408a-11e6-824e-04aed06bd2f7.png) | ![image](https://cloud.githubusercontent.com/assets/1885333/16542728/dcac3700-408a-11e6-8e35-9c8fc4432edc.png) |
## Table of Contents
- [Installation](#installation)
- [Language Support](#language-support)
- [Usage](#usage)
- [Selection of Code](#selection-of-code)
- [Beautify On Save](#beautify-on-save)
- [Keyboard Shortcut](#keyboard-shortcut)
- [Custom Keyboard Shortcuts](#custom-keyboard-shortcuts)
- [Configuration](#configuration)
- [Simple](#simple)
- [Nested](#nested-recommended)
- [Troubleshooting](#troubleshooting)
- [Contributing](#contributing)
## Installation
Atom Package: https://atom.io/packages/atom-beautify Atom Package: https://atom.io/packages/atom-beautify
@ -22,67 +41,91 @@ Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify`
## Language Support ## Language Support
- [x] JavaScript and JSON See [all supported options in the documentation at `docs/options.md`](https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md).
- [x] HTML, including
- [x] [Handlebars](http://handlebarsjs.com/) | Language | Grammars | File Extensions | Supported Beautifiers |
- [x] [Mustache](http://mustache.github.io) | --- | --- | --- | ---- |
- [x] [Embedded Ruby (ERB)](https://github.com/Glavin001/atom-beautify/issues/80) | Apex | `Apex` |`.cls`, `.trigger` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
- Requires [htmlbeautifier](https://github.com/threedaymonk/htmlbeautifier) | Arduino | `Arduino` |`.ino`, `.pde` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
- [x] XML | C | `C`, `opencl` |`.h`, `.c`, `.cl` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) |
- [x] SVG | Coldfusion | `html` |`.cfm`, `.cfml`, `.cfc` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
- [x] [Marko](https://github.com/marko-js/marko) | CoffeeScript | `CoffeeScript` |`.coffee` | [`Coffee Formatter`](https://github.com/Glavin001/Coffee-Formatter), [`coffee-fmt`](https://github.com/sterpe/coffee-fmt) (Default) |
- [x] CSS, including | C++ | `C++` |`.h`, `.hh`, `.cc`, `.cpp`, `.cxx`, `.C`, `.c++`, `.hpp`, `.hxx`, `.h++` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) |
- [Sass](http://sass-lang.com/) | Crystal | `Crystal` |`.cr` | [`Crystal`](http://crystal-lang.org) (Default) |
- [Less](http://lesscss.org/) | C# | `C#` |`.cs` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
- [x] [SQL](https://github.com/Glavin001/atom-beautify/pull/67) | CSS | `CSS` |`.css` | [`CSScomb`](https://github.com/csscomb/csscomb.js), [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
- Requires [python-sqlparse](https://github.com/andialbrecht/sqlparse) | CSV | `CSV` |`.csv` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
- [x] [Markdown](https://github.com/Glavin001/atom-beautify/issues/292) | D | `D` |`.d` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`dfmt`](https://github.com/Hackerpilot/dfmt) |
- [x] [Perl](https://github.com/Glavin001/atom-beautify/issues/33) | EJS | `JavaScript Template`, `HTML (Angular)` | | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
- Requires [perltidy](http://perltidy.sourceforge.net/) | Elm | `Elm` |`.elm` | [`elm-format`](https://github.com/avh4/elm-format) (Default) |
- [x] [PHP](https://github.com/Glavin001/atom-beautify/issues/26) | ERB | `HTML (Ruby - ERB)`, `HTML (Rails)` |`.erb` | [`HTML Beautifier`](https://github.com/threedaymonk/htmlbeautifier), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
- Requires [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) to be already installed. | Erlang | `Erlang` |`.erl` | [`erl_tidy`](http://erlang.org/doc/man/erl_tidy.html) (Default) |
- [x] [Python](https://github.com/Glavin001/atom-beautify/issues/24) | Fortran | `Fortran - Modern` |`.f90` | [`Fortran Beautifier`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/fortran-beautifier/emacs-fortran-formating-script.lisp) (Default) |
- Requires [autopep8](https://github.com/hhatto/autopep8) or [YAPF](https://github.com/google/yapf) to be already installed. | gherkin | `Gherkin` |`.feature` | [`Gherkin formatter`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/gherkin.coffee) (Default) |
- Beautifies to [PEP 8](https://www.python.org/dev/peps/pep-0008/). | Go | `Go` |`.go` | [`gofmt`](https://golang.org/cmd/gofmt/) (Default) |
- [x] [Ruby](https://github.com/Glavin001/atom-beautify/issues/25) | Handlebars | `Handlebars`, `HTML (Handlebars)` |`.hbs`, `.handlebars` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
- Requires [Ruby Beautify](https://github.com/erniebrodeur/ruby-beautify) | Haskell | `Haskell` |`.hs` | [`stylish-haskell`](https://github.com/jaspervdj/stylish-haskell) (Default) |
- [x] [CoffeeScript](https://github.com/Glavin001/atom-beautify/issues/31) | HTML | `HTML` |`.html` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
- [x] [Golang](https://github.com/Glavin001/atom-beautify/issues/176) | Jade | `Jade`, `Pug` |`.jade`, `.pug` | [`Pug Beautify`](https://github.com/vingorius/pug-beautify) (Default) |
- [x] [Java](https://github.com/Glavin001/atom-beautify/issues/45) | Java | `Java` |`.java` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
- Requires [Uncrustify](http://sourceforge.net/projects/uncrustify/) | JavaScript | `JavaScript` |`.js` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`JSCS Fixer`](https://github.com/jscs-dev/node-jscs/), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
- [x] [C](https://github.com/Glavin001/atom-beautify/issues/57) | JSON | `JSON` |`.json` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
- Requires [Uncrustify](http://sourceforge.net/projects/uncrustify/) | JSX | `JSX`, `JavaScript (JSX)` |`.jsx`, `.js` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
- [x] [C++](https://github.com/Glavin001/atom-beautify/issues/57) | LaTeX | `LaTeX` |`.tex` | [`Latex Beautify`](https://github.com/cmhughes/latexindent.pl) (Default) |
- Requires [Uncrustify](http://sourceforge.net/projects/uncrustify/) | LESS | `LESS` |`.less` | [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
- [x] [C#](https://github.com/Glavin001/atom-beautify/issues/57) | Lua | `Lua` |`.lua` | [`Lua beautifier`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/lua-beautifier/beautifier.pl) (Default) |
- Requires [Uncrustify](http://sourceforge.net/projects/uncrustify/) | Markdown | `GitHub Markdown` |`.markdown`, `.md` | [`Remark`](https://github.com/wooorm/remark), [`Tidy Markdown`](https://github.com/slang800/tidy-markdown) (Default) |
- [x] [Objective-C](https://github.com/Glavin001/atom-beautify/issues/57) | Marko | `Marko` |`.marko` | [`Marko Beautifier`](https://github.com/marko-js/marko-prettyprint) (Default) |
- Requires [Uncrustify](http://sourceforge.net/projects/uncrustify/) | Mustache | `HTML (Mustache)` |`.mustache` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default) |
- [x] [D](https://github.com/Glavin001/atom-beautify/issues/57) | Objective-C | `Objective-C`, `Objective-C++` |`.m`, `.mm`, `.h` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) |
- Requires [Uncrustify](http://sourceforge.net/projects/uncrustify/) or [dfmt](https://github.com/Hackerpilot/dfmt) | OCaml | `OCaml` |`.ml` | [`ocp-indent`](https://www.typerex.org/ocp-indent.html) (Default) |
- [x] [Fortran](https://github.com/Glavin001/atom-beautify/issues/300) | Pawn | `Pawn` | | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
- Requires [GNU Emacs](http://www.gnu.org/software/emacs/) | Perl | `Perl`, `Perl 6` |`.pl` | [`Perltidy`](http://perltidy.sourceforge.net/) (Default) |
- [x] [Pawn](https://github.com/Glavin001/atom-beautify/issues/57) | PHP | `PHP` |`.php`, `.module`, `.inc` | [`PHP-CS-Fixer`](http://php.net/manual/en/install.php) (Default), [`PHPCBF`](http://php.net/manual/en/install.php) |
- Requires [Uncrustify](http://sourceforge.net/projects/uncrustify/) | Puppet | `Puppet` |`.pp` | [`puppet-lint`](http://puppet-lint.com/) (Default) |
- [x] [Vala](https://github.com/Glavin001/atom-beautify/issues/57) | Python | `Python` |`.py` | [`autopep8`](https://github.com/hhatto/autopep8) (Default), [`yapf`](https://github.com/google/yapf) |
- Requires [Uncrustify](http://sourceforge.net/projects/uncrustify/) | Riot.js | `Riot.js`, `HTML (Riot Tag)` |`.tag` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
- [x] [TypeScript](https://github.com/Glavin001/atom-beautify/issues/49) | Ruby | `Ruby`, `Ruby on Rails` |`.rb` | [`Rubocop`](https://github.com/bbatsov/rubocop) (Default), [`Ruby Beautify`](https://github.com/erniebrodeur/ruby-beautify) |
- [x] [Haskell](https://github.com/Glavin001/atom-beautify/issues/628) | Rust | `Rust` |`.rs`, `.rlib` | [`rustfmt`](https://github.com/nrc/rustfmt) (Default) |
- Requires [stylish-haskell](https://github.com/jaspervdj/stylish-haskell) | Sass | `Sass` |`.sass` | [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
- [x] [Elm](https://github.com/Glavin001/atom-beautify/pull/700) | SCSS | `SCSS` |`.scss` | [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
- Requires [Elm-Format](https://github.com/avh4/elm-format) | Spacebars | `Spacebars` | | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
- [x] [Erlang](https://github.com/Glavin001/atom-beautify/pull/683) | SQL | `SQL (Rails)`, `SQL` |`.sql` | [`sqlformat`](https://github.com/andialbrecht/sqlparse) (Default) |
- Requires erlang syntax_tools to be installed | SVG | `SVG` |`.svg` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
- [x] [Crystal](https://github.com/Glavin001/atom-beautify/pull/900) | Swig | `HTML (Swig)`, `SWIG` |`.swig` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
- [x] [Lua](https://github.com/Glavin001/atom-beautify/pull/973) | TSS | `TSS` |`.tss` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| Twig | `HTML (Twig)` |`.twig` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| TypeScript | `TypeScript` |`.ts` | [`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter) (Default) |
| Vala | `Vala` |`.vala`, `.vapi` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
| Visualforce | `Visualforce` |`.page` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| XML | `SLD`, `XML`, `XHTML`, `XSD`, `XSL`, `JSP` |`.sld`, `.xml`, `.xhtml`, `.xsd`, `.xsl`, `.jsp` | [`JS Beautify`](https://github.com/beautify-web/js-beautify), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| XTemplate | `XTemplate` |`.xtemplate` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
## Usage ## Usage
Open the [Command Palette](https://github.com/atom/command-palette), and type `Beautify`. Open the [Command Palette](https://github.com/atom/command-palette), type `Beautify`, and run `Beautify Editor`.
![image](https://cloud.githubusercontent.com/assets/1885333/16542583/1c8d975c-4085-11e6-8307-e35df7430a10.png)
### Selection of Code
It will only beautify selected text if a selection is found -- if not, the whole file will be beautified. It will only beautify selected text if a selection is found -- if not, the whole file will be beautified.
### Shortcut | Selection of Code | Beautify Selection of Code | Beautify Entire File |
| --- | --- | --- |
| Select code in Atom editor | Only that selection is beautified | Without a selection all code is beautified |
| ![image](https://cloud.githubusercontent.com/assets/1885333/16542597/b3f90c84-4085-11e6-8a0e-1b8604ae385c.png) | ![image](https://cloud.githubusercontent.com/assets/1885333/16542598/b5a86b10-4085-11e6-80cf-0afaf1a819c3.png) | ![image](https://cloud.githubusercontent.com/assets/1885333/16542603/b798ec24-4085-11e6-880e-8d3a2741940f.png) |
### Beautify On Save
`Beautify On Save` can be enabled for each language individually.
For example, for language `HTML` go into Atom-Beautify's package settings (`Atom` ➔ `Preferences` ➔ Search for `atom-beautify`), find `HTML`, and toggle the `Beautify On Save` option.
![atom-beautify-setup-beautify-on-save](https://cloud.githubusercontent.com/assets/1885333/16542692/3e781e74-4089-11e6-9cf2-5a19af161093.gif)
### Keyboard Shortcut
You can also type <kbd>Ctrl</kbd>-<kbd>Alt</kbd>-<kbd>B</kbd> as a shortcut or click `Packages > Beautify` in the menu. You can also type <kbd>Ctrl</kbd>-<kbd>Alt</kbd>-<kbd>B</kbd> as a shortcut or click `Packages > Beautify` in the menu.
@ -132,7 +175,7 @@ See [examples/simple-jsbeautifyrc/.jsbeautifyrc](https://github.com/donaldpipowi
} }
``` ```
### Nested ### Nested (Recommended)
See [examples/nested-jsbeautifyrc/.jsbeautifyrc](https://github.com/donaldpipowitch/atom-beautify/blob/master/examples/nested-jsbeautifyrc/.jsbeautifyrc). See [examples/nested-jsbeautifyrc/.jsbeautifyrc](https://github.com/donaldpipowitch/atom-beautify/blob/master/examples/nested-jsbeautifyrc/.jsbeautifyrc).
@ -170,6 +213,10 @@ See [examples/nested-jsbeautifyrc/.jsbeautifyrc](https://github.com/donaldpipowi
} }
``` ```
## Troubleshooting
Coming soon.
## Contributing ## Contributing
[See all contributors on GitHub](https://github.com/donaldpipowitch/atom-beautify/graphs/contributors). [See all contributors on GitHub](https://github.com/donaldpipowitch/atom-beautify/graphs/contributors).

View File

@ -5,12 +5,16 @@ Handlebars = require('handlebars')
Beautifiers = require("../src/beautifiers") Beautifiers = require("../src/beautifiers")
fs = require('fs') fs = require('fs')
_ = require('lodash') _ = require('lodash')
path = require('path')
pkg = require('../package.json')
console.log('Generating options...') console.log('Generating options...')
beautifier = new Beautifiers() beautifier = new Beautifiers()
languageOptions = beautifier.options languageOptions = beautifier.options
packageOptions = require('../src/config.coffee') packageOptions = require('../src/config.coffee')
# Build options by Beautifier # Build options by Beautifier
beautifiersMap = _.keyBy(beautifier.beautifiers, 'name')
languagesMap = _.keyBy(beautifier.languages.languages, 'name')
beautifierOptions = {} beautifierOptions = {}
for lo, optionGroup of languageOptions for lo, optionGroup of languageOptions
for optionName, optionDef of optionGroup.properties for optionName, optionDef of optionGroup.properties
@ -20,18 +24,23 @@ for lo, optionGroup of languageOptions
beautifierOptions[beautifierName][optionName] = optionDef beautifierOptions[beautifierName][optionName] = optionDef
console.log('Loading options template...') console.log('Loading options template...')
readmeTemplatePath = path.resolve(__dirname, '../README-template.md')
readmePath = path.resolve(__dirname, '../README.md')
optionsTemplatePath = __dirname + '/options-template.md' optionsTemplatePath = __dirname + '/options-template.md'
optionTemplatePath = __dirname + '/option-template.md' optionTemplatePath = __dirname + '/option-template.md'
optionGroupTemplatePath = __dirname + '/option-group-template.md' optionGroupTemplatePath = __dirname + '/option-group-template.md'
optionsPath = __dirname + '/options.md' optionsPath = __dirname + '/options.md'
optionsTemplate = fs.readFileSync(optionsTemplatePath).toString() optionsTemplate = fs.readFileSync(optionsTemplatePath).toString()
optionGroupTemplate = fs.readFileSync(optionGroupTemplatePath).toString() optionGroupTemplate = fs.readFileSync(optionGroupTemplatePath).toString()
optionTemplate = fs.readFileSync(optionTemplatePath).toString() optionTemplate = fs.readFileSync(optionTemplatePath).toString()
readmeTemplate = fs.readFileSync(readmeTemplatePath).toString()
console.log('Building documentation from template and options...') console.log('Building documentation from template and options...')
Handlebars.registerPartial('option', optionTemplate) Handlebars.registerPartial('option', optionTemplate)
Handlebars.registerPartial('option-group', optionGroupTemplate) Handlebars.registerPartial('option-group', optionGroupTemplate)
template = Handlebars.compile(optionsTemplate) template = Handlebars.compile(optionsTemplate)
readmeTemplate = Handlebars.compile(readmeTemplate)
linkifyTitle = (title) -> linkifyTitle = (title) ->
title = title.toLowerCase() title = title.toLowerCase()
@ -71,6 +80,41 @@ Handlebars.registerHelper('example-config', (key, option, options) ->
return new Handlebars.SafeString(results) return new Handlebars.SafeString(results)
) )
Handlebars.registerHelper('language-beautifiers-support', (languageOptions, options) ->
###
| Language | Supported Beautifiers |
| --- | ---- |
| JavaScript | Js-Beautify, Pretty Diff |
###
rows = _.map(languageOptions, (val, k) ->
name = val.title
defaultBeautifier = _.get(val, "properties.default_beautifier.default")
beautifiers = _.map(val.beautifiers, (b) ->
beautifier = beautifiersMap[b]
isDefault = b is defaultBeautifier
if beautifier.link
r = "[`#{b}`](#{beautifier.link})"
else
r = "`#{b}`"
if isDefault
r += " (Default)"
return r
)
grammars = _.map(val.grammars, (b) -> "`#{b}`")
extensions = _.map(val.extensions, (b) -> "`.#{b}`")
return "| #{name} | #{grammars.join(', ')} |#{extensions.join(', ')} | #{beautifiers.join(', ')} |"
)
results = """
| Language | Grammars | File Extensions | Supported Beautifiers |
| --- | --- | --- | ---- |
#{rows.join('\n')}
"""
return new Handlebars.SafeString(results)
)
sortKeysBy = (obj, comparator) -> sortKeysBy = (obj, comparator) ->
keys = _.sortBy(_.keys(obj), (key) -> keys = _.sortBy(_.keys(obj), (key) ->
return if comparator then comparator(obj[key], key) else key return if comparator then comparator(obj[key], key) else key
@ -93,13 +137,27 @@ sortSettings = (settings) ->
return r return r
context = { context = {
package: pkg,
packageOptions: sortSettings(packageOptions) packageOptions: sortSettings(packageOptions)
languageOptions: sortSettings(languageOptions) languageOptions: sortSettings(languageOptions)
beautifierOptions: sortSettings(beautifierOptions) beautifierOptions: sortSettings(beautifierOptions)
} }
result = template(context) result = template(context)
readmeResult = readmeTemplate(context)
console.log('Writing documentation to file...') console.log('Writing documentation to file...')
fs.writeFileSync(optionsPath, result) fs.writeFileSync(optionsPath, result)
fs.writeFileSync(readmePath, readmeResult)
# fs.writeFileSync(__dirname+'/context.json', JSON.stringify(context, undefined, 2))
console.log('Updating package.json')
# Add Language keywords
ls = _.map(Object.keys(languagesMap), (a)->a.toLowerCase())
# Add Beautifier keywords
bs = _.map(Object.keys(beautifiersMap), (a)->a.toLowerCase())
keywords = _.union(pkg.keywords, ls, bs)
pkg.keywords = keywords
fs.writeFileSync(path.resolve(__dirname,'../package.json'), JSON.stringify(pkg, undefined, 2))
console.log('Done.') console.log('Done.')

View File

@ -1181,7 +1181,7 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify)
#### [Crystal](#crystal) #### [Crystal](#crystal)
**Supported Beautifiers**: [`crystal`](#crystal) **Supported Beautifiers**: [`Crystal`](#crystal)
**Description**: **Description**:
@ -1208,11 +1208,11 @@ Disable Crystal Beautification
**Important**: This option is only configurable from within Atom Beautify's setting panel. **Important**: This option is only configurable from within Atom Beautify's setting panel.
**Default**: `crystal` **Default**: `Crystal`
**Type**: `string` **Type**: `string`
**Enum**: `crystal` **Enum**: `Crystal`
**Description**: **Description**:
@ -5806,7 +5806,7 @@ Maximum amount of characters per line (0 = disable) (Supported by Pretty Diff)
#### [Lua](#lua) #### [Lua](#lua)
**Supported Beautifiers**: [`lua`](#lua) **Supported Beautifiers**: [`Lua beautifier`](#lua-beautifier)
**Description**: **Description**:
@ -5833,11 +5833,11 @@ Disable Lua Beautification
**Important**: This option is only configurable from within Atom Beautify's setting panel. **Important**: This option is only configurable from within Atom Beautify's setting panel.
**Default**: `lua` **Default**: `Lua beautifier`
**Type**: `string` **Type**: `string`
**Enum**: `lua` **Enum**: `Lua beautifier`
**Description**: **Description**:

View File

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en-us" xmlns="http://www.w3.org/1999/xhtml"> <html lang="en-us" xmlns="http://www.w3.org/1999/xhtml">
<head>
<head> <title>Test</title>
<title>Test</title> </head>
</head> <body>
<ul>
<body> <li>
<ul> <code>foo:bar</code>
<li><code>foo:bar</code></li> </li>
</ul> </ul>
</body>
</html> </html>

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html><html lang="en-us" xmlns="http://www.w3.org/1999/xhtml"> <!DOCTYPE html><html lang="en-us" xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>Test</title> <title>Test</title>
</head> </head>
<body> <body>
<ul> <ul>
<li><code>foo:bar</code></li> <li><code>foo:bar</code></li>
</ul> </ul>
</body>
</html> </html>

View File

@ -3,7 +3,7 @@
"main": "./src/beautify", "main": "./src/beautify",
"version": "0.29.9", "version": "0.29.9",
"private": true, "private": true,
"description": "Beautify HTML, CSS, JavaScript, PHP, Python, Ruby, Java, C, C++, C#, Objective-C, CoffeeScript, TypeScript, Coldfusion, and SQL in Atom", "description": "Beautify HTML, CSS, JavaScript, PHP, Python, Ruby, Java, C, C++, C#, Objective-C, CoffeeScript, TypeScript, Coldfusion, SQL, and more in Atom",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/Glavin001/atom-beautify" "url": "https://github.com/Glavin001/atom-beautify"
@ -163,7 +163,6 @@
"css", "css",
"javascript", "javascript",
"json", "json",
"css",
"sass", "sass",
"scss", "scss",
"less", "less",
@ -197,7 +196,62 @@
"golang", "golang",
"svg", "svg",
"elm", "elm",
"lua" "lua",
"arduino",
"crystal",
"csv",
"ejs",
"erlang",
"gherkin",
"fortran",
"haskell",
"jade",
"jsx",
"latex",
"ocaml",
"perl",
"puppet",
"riot.js",
"rust",
"spacebars",
"swig",
"tss",
"twig",
"visualforce",
"xtemplate",
"autopep8",
"coffee formatter",
"coffee-fmt",
"clang-format",
"dfmt",
"elm-format",
"html beautifier",
"csscomb",
"gherkin formatter",
"gofmt",
"latex beautify",
"fortran beautifier",
"js beautify",
"jscs fixer",
"lua beautifier",
"ocp-indent",
"perltidy",
"php-cs-fixer",
"phpcbf",
"pretty diff",
"pug beautify",
"puppet-lint",
"remark",
"rubocop",
"ruby beautify",
"rustfmt",
"sqlformat",
"stylish-haskell",
"tidy markdown",
"typescript formatter",
"yapf",
"erl_tidy",
"marko beautifier"
], ],
"devDependencies": { "devDependencies": {
"coffeelint": "^1.10.1", "coffeelint": "^1.10.1",

View File

@ -184,6 +184,8 @@ buildOptionsForBeautifiers = function(beautifiers, allLanguages) {
description: "Options for language " + lang.name, description: "Options for language " + lang.name,
collapsed: true, collapsed: true,
beautifiers: [], beautifiers: [],
grammars: lang.grammars,
extensions: lang.extensions,
properties: {} properties: {}
}; };
} }

View File

@ -8,6 +8,7 @@ Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier module.exports = class Autopep8 extends Beautifier
name: "autopep8" name: "autopep8"
link: "https://github.com/hhatto/autopep8"
options: { options: {
Python: true Python: true

View File

@ -10,6 +10,7 @@ fs = require('fs')
module.exports = class ClangFormat extends Beautifier module.exports = class ClangFormat extends Beautifier
name: "clang-format" name: "clang-format"
link: "https://clang.llvm.org/docs/ClangFormat.html"
options: { options: {
"C++": false "C++": false

View File

@ -3,6 +3,7 @@ Beautifier = require('./beautifier')
module.exports = class CoffeeFmt extends Beautifier module.exports = class CoffeeFmt extends Beautifier
name: "coffee-fmt" name: "coffee-fmt"
link: "https://github.com/sterpe/coffee-fmt"
options: { options: {
# Apply language-specific options # Apply language-specific options

View File

@ -4,6 +4,7 @@ Beautifier = require('./beautifier')
module.exports = class CoffeeFormatter extends Beautifier module.exports = class CoffeeFormatter extends Beautifier
name: "Coffee Formatter" name: "Coffee Formatter"
link: "https://github.com/Glavin001/Coffee-Formatter"
options: { options: {
CoffeeScript: true CoffeeScript: true

View File

@ -6,7 +6,8 @@ Requires https://github.com/jaspervdj/stylish-haskell
Beautifier = require('./beautifier') Beautifier = require('./beautifier')
module.exports = class Crystal extends Beautifier module.exports = class Crystal extends Beautifier
name: "crystal" name: "Crystal"
link: "http://crystal-lang.org"
options: { options: {
Crystal: true Crystal: true

View File

@ -3,6 +3,7 @@ Beautifier = require('./beautifier')
module.exports = class JSBeautify extends Beautifier module.exports = class JSBeautify extends Beautifier
name: "CSScomb" name: "CSScomb"
link: "https://github.com/csscomb/csscomb.js"
options: { options: {
# TODO: Add support for options # TODO: Add support for options

View File

@ -6,6 +6,7 @@ Beautifier = require('./beautifier')
module.exports = class Dfmt extends Beautifier module.exports = class Dfmt extends Beautifier
name: "dfmt" name: "dfmt"
link: "https://github.com/Hackerpilot/dfmt"
options: { options: {
D: false D: false

View File

@ -6,6 +6,7 @@ Beautifier = require('./beautifier')
module.exports = class ElmFormat extends Beautifier module.exports = class ElmFormat extends Beautifier
name: "elm-format" name: "elm-format"
link: "https://github.com/avh4/elm-format"
options: { options: {
Elm: true Elm: true

View File

@ -8,6 +8,7 @@ Beautifier = require('./beautifier')
module.exports = class ErlTidy extends Beautifier module.exports = class ErlTidy extends Beautifier
name: "erl_tidy" name: "erl_tidy"
link: "http://erlang.org/doc/man/erl_tidy.html"
options: { options: {
Erlang: true Erlang: true
@ -20,7 +21,9 @@ module.exports = class ErlTidy extends Beautifier
@run("erl", [ @run("erl", [
["-eval", 'erl_tidy:file("' + tempFile + '")'] ["-eval", 'erl_tidy:file("' + tempFile + '")']
["-noshell", "-s", "init", "stop"] ["-noshell", "-s", "init", "stop"]
]) ],
{ help: { link: "http://erlang.org/doc/man/erl_tidy.html" } }
)
).then(=> ).then(=>
@readFile(tempFile) @readFile(tempFile)
) )

View File

@ -8,6 +8,7 @@ path = require("path")
module.exports = class FortranBeautifier extends Beautifier module.exports = class FortranBeautifier extends Beautifier
name: "Fortran Beautifier" name: "Fortran Beautifier"
link: "https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/fortran-beautifier/emacs-fortran-formating-script.lisp"
options: { options: {
Fortran: true Fortran: true

View File

@ -8,6 +8,7 @@ logger = require('../logger')(__filename)
module.exports = class Gherkin extends Beautifier module.exports = class Gherkin extends Beautifier
name: "Gherkin formatter" name: "Gherkin formatter"
link: "https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/gherkin.coffee"
options: { options: {
gherkin: true gherkin: true

View File

@ -7,6 +7,7 @@ Beautifier = require('./beautifier')
module.exports = class Gofmt extends Beautifier module.exports = class Gofmt extends Beautifier
name: "gofmt" name: "gofmt"
link: "https://golang.org/cmd/gofmt/"
options: { options: {
Go: true Go: true

View File

@ -7,6 +7,7 @@ Beautifier = require('./beautifier')
module.exports = class HTMLBeautifier extends Beautifier module.exports = class HTMLBeautifier extends Beautifier
name: "HTML Beautifier" name: "HTML Beautifier"
link: "https://github.com/threedaymonk/htmlbeautifier"
options: { options: {
ERB: ERB:
indent_size: true indent_size: true

View File

@ -3,6 +3,7 @@ Beautifier = require('./beautifier')
module.exports = class JSBeautify extends Beautifier module.exports = class JSBeautify extends Beautifier
name: "JS Beautify" name: "JS Beautify"
link: "https://github.com/beautify-web/js-beautify"
options: { options: {
HTML: true HTML: true

View File

@ -7,6 +7,7 @@ checker = null
module.exports = class JSCSFixer extends Beautifier module.exports = class JSCSFixer extends Beautifier
name: "JSCS Fixer" name: "JSCS Fixer"
link: "https://github.com/jscs-dev/node-jscs/"
options: { options: {
JavaScript: false JavaScript: false

View File

@ -7,6 +7,7 @@ temp = require("temp").track()
module.exports = class LatexBeautify extends Beautifier module.exports = class LatexBeautify extends Beautifier
name: "Latex Beautify" name: "Latex Beautify"
link: "https://github.com/cmhughes/latexindent.pl"
options: { options: {
LaTeX: true LaTeX: true

View File

@ -6,7 +6,8 @@ path = require("path")
Beautifier = require('../beautifier') Beautifier = require('../beautifier')
module.exports = class Lua extends Beautifier module.exports = class Lua extends Beautifier
name: "lua" name: "Lua beautifier"
link: "https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/lua-beautifier/beautifier.pl"
options: { options: {
Lua: true Lua: true

View File

@ -4,6 +4,7 @@ Beautifier = require('./beautifier')
module.exports = class MarkoBeautifier extends Beautifier module.exports = class MarkoBeautifier extends Beautifier
name: 'Marko Beautifier' name: 'Marko Beautifier'
link: "https://github.com/marko-js/marko-prettyprint"
options: options:
Marko: true Marko: true

View File

@ -7,6 +7,7 @@ Beautifier = require('./beautifier')
module.exports = class OCPIndent extends Beautifier module.exports = class OCPIndent extends Beautifier
name: "ocp-indent" name: "ocp-indent"
link: "https://www.typerex.org/ocp-indent.html"
options: { options: {
OCaml: true OCaml: true

View File

@ -6,6 +6,7 @@ Beautifier = require('./beautifier')
module.exports = class PerlTidy extends Beautifier module.exports = class PerlTidy extends Beautifier
name: "Perltidy" name: "Perltidy"
link: "http://perltidy.sourceforge.net/"
options: { options: {
Perl: true Perl: true

View File

@ -9,6 +9,7 @@ path = require('path')
module.exports = class PHPCSFixer extends Beautifier module.exports = class PHPCSFixer extends Beautifier
name: 'PHP-CS-Fixer' name: 'PHP-CS-Fixer'
link: "http://php.net/manual/en/install.php"
options: options:
PHP: true PHP: true

View File

@ -7,6 +7,7 @@ Beautifier = require('./beautifier')
module.exports = class PHPCBF extends Beautifier module.exports = class PHPCBF extends Beautifier
name: "PHPCBF" name: "PHPCBF"
link: "http://php.net/manual/en/install.php"
options: { options: {
_: _:

View File

@ -3,6 +3,7 @@ Beautifier = require('./beautifier')
module.exports = class PrettyDiff extends Beautifier module.exports = class PrettyDiff extends Beautifier
name: "Pretty Diff" name: "Pretty Diff"
link: "https://github.com/prettydiff/prettydiff"
options: { options: {
# Apply these options first / globally, for all languages # Apply these options first / globally, for all languages
_: _:

View File

@ -3,6 +3,7 @@ Beautifier = require('./beautifier')
module.exports = class PugBeautify extends Beautifier module.exports = class PugBeautify extends Beautifier
name: "Pug Beautify" name: "Pug Beautify"
link: "https://github.com/vingorius/pug-beautify"
options: { options: {
# Apply these options first / globally, for all languages # Apply these options first / globally, for all languages
Jade: Jade:

View File

@ -7,6 +7,7 @@ Beautifier = require('./beautifier')
module.exports = class PuppetFix extends Beautifier module.exports = class PuppetFix extends Beautifier
# this is what displays as your Default Beautifier in Language Config # this is what displays as your Default Beautifier in Language Config
name: "puppet-lint" name: "puppet-lint"
link: "http://puppet-lint.com/"
options: { options: {
Puppet: true Puppet: true

View File

@ -3,6 +3,7 @@ Beautifier = require('./beautifier')
module.exports = class Remark extends Beautifier module.exports = class Remark extends Beautifier
name: "Remark" name: "Remark"
link: "https://github.com/wooorm/remark"
options: { options: {
_: { _: {
gfm: true gfm: true

View File

@ -7,6 +7,7 @@ Beautifier = require('./beautifier')
module.exports = class Rubocop extends Beautifier module.exports = class Rubocop extends Beautifier
name: "Rubocop" name: "Rubocop"
link: "https://github.com/bbatsov/rubocop"
options: { options: {
Ruby: Ruby:

View File

@ -7,6 +7,7 @@ Beautifier = require('./beautifier')
module.exports = class RubyBeautify extends Beautifier module.exports = class RubyBeautify extends Beautifier
name: "Ruby Beautify" name: "Ruby Beautify"
link: "https://github.com/erniebrodeur/ruby-beautify"
options: { options: {
Ruby: Ruby:

View File

@ -10,6 +10,7 @@ versionCheckState = false
module.exports = class Rustfmt extends Beautifier module.exports = class Rustfmt extends Beautifier
name: "rustfmt" name: "rustfmt"
link: "https://github.com/nrc/rustfmt"
options: { options: {
Rust: true Rust: true

View File

@ -7,6 +7,7 @@ Beautifier = require('./beautifier')
module.exports = class Sqlformat extends Beautifier module.exports = class Sqlformat extends Beautifier
name: "sqlformat" name: "sqlformat"
link: "https://github.com/andialbrecht/sqlparse"
options: { options: {
SQL: true SQL: true

View File

@ -7,6 +7,7 @@ Beautifier = require('./beautifier')
module.exports = class StylishHaskell extends Beautifier module.exports = class StylishHaskell extends Beautifier
name: "stylish-haskell" name: "stylish-haskell"
link: "https://github.com/jaspervdj/stylish-haskell"
options: { options: {
Haskell: true Haskell: true
@ -15,4 +16,8 @@ module.exports = class StylishHaskell extends Beautifier
beautify: (text, language, options) -> beautify: (text, language, options) ->
@run("stylish-haskell", [ @run("stylish-haskell", [
@tempFile("input", text) @tempFile("input", text)
]) ], {
help: {
link: "https://github.com/jaspervdj/stylish-haskell"
}
})

View File

@ -3,6 +3,7 @@ Beautifier = require('./beautifier')
module.exports = class TidyMarkdown extends Beautifier module.exports = class TidyMarkdown extends Beautifier
name: "Tidy Markdown" name: "Tidy Markdown"
link: "https://github.com/slang800/tidy-markdown"
options: { options: {
Markdown: false Markdown: false
} }

View File

@ -3,6 +3,7 @@ Beautifier = require('./beautifier')
module.exports = class TypeScriptFormatter extends Beautifier module.exports = class TypeScriptFormatter extends Beautifier
name: "TypeScript Formatter" name: "TypeScript Formatter"
link: "https://github.com/vvakame/typescript-formatter"
options: { options: {
TypeScript: true TypeScript: true
} }

View File

@ -10,6 +10,7 @@ _ = require('lodash')
module.exports = class Uncrustify extends Beautifier module.exports = class Uncrustify extends Beautifier
name: "Uncrustify" name: "Uncrustify"
link: "https://github.com/uncrustify/uncrustify"
options: { options: {
Apex: true Apex: true
C: true C: true

View File

@ -8,6 +8,7 @@ Beautifier = require('./beautifier')
module.exports = class Yapf extends Beautifier module.exports = class Yapf extends Beautifier
name: "yapf" name: "yapf"
link: "https://github.com/google/yapf"
options: { options: {
Python: false Python: false

View File

@ -17,6 +17,6 @@ module.exports = {
'lua' 'lua'
] ]
defaultBeautifier: "lua" defaultBeautifier: "Lua beautifier"
} }