diff --git a/README.md b/README.md index 94b93cc..9a7a96c 100644 --- a/README.md +++ b/README.md @@ -74,11 +74,11 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti | 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), [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) | | CSV | `CSV` |`.csv` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | D | `D` |`.d` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`dfmt`](https://github.com/Hackerpilot/dfmt) | -| EJS | `JavaScript Template`, `HTML (Angular)` | | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | +| EJS | `EJS`, `JavaScript Template`, `HTML (Angular)` | | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) | | Elm | `Elm` |`.elm` | [`elm-format`](https://github.com/avh4/elm-format) (Default) | | ERB | `HTML (Ruby - ERB)`, `HTML (Rails)` |`.erb` | [`HTML Beautifier`](https://github.com/threedaymonk/htmlbeautifier), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | Erlang | `Erlang` |`.erl` | [`erl_tidy`](http://erlang.org/doc/man/erl_tidy.html) (Default) | -| Fortran | `Fortran - Modern` |`.f90`, `.F90` | [`Fortran Beautifier`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/fortran-beautifier/emacs-fortran-formating-script.lisp) (Default) | +| Fortran | `Fortran - Modern` |`.f90`, `.F90`, `.f95`, `.F95` | [`Fortran Beautifier`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/fortran-beautifier/emacs-fortran-formating-script.lisp) (Default) | | gherkin | `Gherkin` |`.feature` | [`Gherkin formatter`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/gherkin.coffee) (Default) | | GLSL | `C`, `opencl`, `GLSL` |`.vert`, `.frag` | [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) (Default) | | Go | `Go` |`.go` | [`gofmt`](https://golang.org/cmd/gofmt/) (Default) | @@ -89,7 +89,7 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti | Java | `Java` |`.java` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) | | 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) | | JSON | `JSON` |`.json` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) | -| JSX | `JSX`, `JavaScript (JSX)`, `Babel ES6 JavaScript` |`.jsx`, `.js` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | +| JSX | `JSX`, `JavaScript (JSX)`, `Babel ES6 JavaScript` |`.jsx`, `.js` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) | | LaTeX | `LaTeX` |`.tex` | [`Latex Beautify`](https://github.com/cmhughes/latexindent.pl) (Default) | | LESS | `LESS` |`.less` | [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | Lua | `Lua` |`.lua` | [`Lua beautifier`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/lua-beautifier/beautifier.pl) (Default) | @@ -121,7 +121,7 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti | Vala | `Vala` |`.vala`, `.vapi` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) | | Visualforce | `Visualforce` |`.page` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | Vue | `Vue Component` |`.vue` | `Vue Beautifier` (Default) | -| XML | `SLD`, `XML`, `XHTML`, `XSD`, `XSL`, `JSP`, `GSP` |`.sld`, `.xml`, `.xhtml`, `.xsd`, `.xsl`, `.jsp`, `.gsp` | [`JS Beautify`](https://github.com/beautify-web/js-beautify), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | +| XML | `SLD`, `XML`, `XHTML`, `XSD`, `XSL`, `JSP`, `GSP` |`.sld`, `.xml`, `.xhtml`, `.xsd`, `.xsl`, `.jsp`, `.gsp`, `.plist`, `.recipe` | [`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 diff --git a/docs/options.md b/docs/options.md index 62b0c58..4d694fb 100644 --- a/docs/options.md +++ b/docs/options.md @@ -328,6 +328,7 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify) | `disabled` | :white_check_mark: | | `default_beautifier` | :white_check_mark: | | `beautify_on_save` | :white_check_mark: | +| `indent_size` | :white_check_mark: | **Description**: @@ -388,6 +389,32 @@ Automatically beautify Bash files on save 2. Go into *Packages* and search for "*Atom Beautify*" package. 3. Find the option "*Beautify On Save*" and change it to your desired configuration. +##### [Indent size](#indent-size) + +**Namespace**: `bash` + +**Key**: `indent_size` + +**Default**: `2` + +**Type**: `integer` + +**Supported Beautifiers**: [`beautysh`](#beautysh) + +**Description**: + +Indentation size/length (Supported by beautysh) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "bash": { + "indent_size": 2 + } +} +``` + #### [C](#c) **Supported Beautifiers**: [`Uncrustify`](#uncrustify) [`clang-format`](#clang-format) @@ -2143,22 +2170,38 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify) #### [EJS](#ejs) -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) -| Option | Pretty Diff | -| --- | --- | -| `disabled` | :white_check_mark: | -| `default_beautifier` | :white_check_mark: | -| `beautify_on_save` | :white_check_mark: | -| `break_chained_methods` | :white_check_mark: | -| `end_with_comma` | :white_check_mark: | -| `indent_char` | :white_check_mark: | -| `indent_size` | :white_check_mark: | -| `indent_with_tabs` | :white_check_mark: | -| `preserve_newlines` | :white_check_mark: | -| `space_after_anon_function` | :white_check_mark: | -| `space_in_paren` | :white_check_mark: | -| `wrap_line_length` | :white_check_mark: | +| Option | JS Beautify | Pretty Diff | +| --- | --- | --- | +| `disabled` | :white_check_mark: | :white_check_mark: | +| `default_beautifier` | :white_check_mark: | :white_check_mark: | +| `beautify_on_save` | :white_check_mark: | :white_check_mark: | +| `brace_style` | :white_check_mark: | :x: | +| `break_chained_methods` | :white_check_mark: | :white_check_mark: | +| `end_with_comma` | :white_check_mark: | :white_check_mark: | +| `end_with_newline` | :white_check_mark: | :x: | +| `eval_code` | :white_check_mark: | :x: | +| `extra_liners` | :white_check_mark: | :x: | +| `indent_char` | :white_check_mark: | :white_check_mark: | +| `indent_inner_html` | :white_check_mark: | :x: | +| `indent_level` | :white_check_mark: | :x: | +| `indent_scripts` | :white_check_mark: | :x: | +| `indent_size` | :white_check_mark: | :white_check_mark: | +| `indent_with_tabs` | :white_check_mark: | :white_check_mark: | +| `jslint_happy` | :white_check_mark: | :x: | +| `keep_array_indentation` | :white_check_mark: | :x: | +| `keep_function_indentation` | :white_check_mark: | :x: | +| `max_preserve_newlines` | :white_check_mark: | :x: | +| `preserve_newlines` | :white_check_mark: | :white_check_mark: | +| `space_after_anon_function` | :white_check_mark: | :white_check_mark: | +| `space_before_conditional` | :white_check_mark: | :x: | +| `space_in_paren` | :white_check_mark: | :white_check_mark: | +| `unescape_strings` | :white_check_mark: | :x: | +| `unformatted` | :white_check_mark: | :x: | +| `wrap_attributes` | :white_check_mark: | :x: | +| `wrap_attributes_indent_size` | :white_check_mark: | :x: | +| `wrap_line_length` | :white_check_mark: | :white_check_mark: | **Description**: @@ -2185,11 +2228,11 @@ Disable EJS Beautification **Important**: This option is only configurable from within Atom Beautify's setting panel. -**Default**: `Pretty Diff` +**Default**: `JS Beautify` **Type**: `string` -**Enum**: `Pretty Diff` +**Enum**: `JS Beautify` `Pretty Diff` **Description**: @@ -2219,6 +2262,34 @@ Automatically beautify EJS files on save 2. Go into *Packages* and search for "*Atom Beautify*" package. 3. Find the option "*Beautify On Save*" and change it to your desired configuration. +##### [Brace style](#brace-style) + +**Namespace**: `html` + +**Key**: `brace_style` + +**Default**: `collapse` + +**Type**: `string` + +**Enum**: `collapse` `expand` `end-expand` `none` `none` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[collapse|expand|end-expand|none] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "brace_style": "collapse" + } +} +``` + ##### [Break chained methods](#break-chained-methods) **Namespace**: `js` @@ -2227,11 +2298,11 @@ Automatically beautify EJS files on save **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Break chained method calls across subsequent lines (Supported by Pretty Diff) +Break chained method calls across subsequent lines (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -2251,11 +2322,11 @@ Break chained method calls across subsequent lines (Supported by Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by Pretty Diff) +If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -2267,6 +2338,84 @@ If a terminating comma should be inserted into arrays, object literals, and dest } ``` +##### [End with newline](#end-with-newline) + +**Namespace**: `html` + +**Key**: `end_with_newline` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +End output with newline (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "end_with_newline": false + } +} +``` + +##### [Eval code](#eval-code) + +**Namespace**: `js` + +**Key**: `eval_code` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "eval_code": false + } +} +``` + +##### [Extra liners](#extra-liners) + +**Namespace**: `html` + +**Key**: `extra_liners` + +**Default**: `head,body,/html` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to [head,body,/html] that should have an extra newline before them. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "extra_liners": [ + "head", + "body", + "/html" + ] + } +} +``` + ##### [Indent char](#indent-char) **Namespace**: `html` @@ -2277,11 +2426,11 @@ If a terminating comma should be inserted into arrays, object literals, and dest **Type**: `string` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Indentation character (Supported by Pretty Diff) +Indentation character (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -2293,6 +2442,82 @@ Indentation character (Supported by Pretty Diff) } ``` +##### [Indent inner html](#indent-inner-html) + +**Namespace**: `html` + +**Key**: `indent_inner_html` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent and sections. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_inner_html": false + } +} +``` + +##### [Indent level](#indent-level) + +**Namespace**: `js` + +**Key**: `indent_level` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Initial indentation level (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "indent_level": 0 + } +} +``` + +##### [Indent scripts](#indent-scripts) + +**Namespace**: `html` + +**Key**: `indent_scripts` + +**Default**: `normal` + +**Type**: `string` + +**Enum**: `keep` `separate` `normal` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[keep|separate|normal] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_scripts": "normal" + } +} +``` + ##### [Indent size](#indent-size) **Namespace**: `html` @@ -2303,11 +2528,11 @@ Indentation character (Supported by Pretty Diff) **Type**: `integer` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Indentation size/length (Supported by Pretty Diff) +Indentation size/length (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -2327,11 +2552,11 @@ Indentation size/length (Supported by Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by Pretty Diff) +Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -2343,6 +2568,104 @@ Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by P } ``` +##### [Jslint happy](#jslint-happy) + +**Namespace**: `js` + +**Key**: `jslint_happy` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Enable jslint-stricter mode (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "jslint_happy": false + } +} +``` + +##### [Keep array indentation](#keep-array-indentation) + +**Namespace**: `js` + +**Key**: `keep_array_indentation` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Preserve array indentation (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "keep_array_indentation": false + } +} +``` + +##### [Keep function indentation](#keep-function-indentation) + +**Namespace**: `js` + +**Key**: `keep_function_indentation` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "keep_function_indentation": false + } +} +``` + +##### [Max preserve newlines](#max-preserve-newlines) + +**Namespace**: `html` + +**Key**: `max_preserve_newlines` + +**Default**: `10` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Number of line-breaks to be preserved in one chunk (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "max_preserve_newlines": 10 + } +} +``` + ##### [Preserve newlines](#preserve-newlines) **Namespace**: `html` @@ -2353,11 +2676,11 @@ Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by P **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Preserve line-breaks (Supported by Pretty Diff) +Preserve line-breaks (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -2377,11 +2700,11 @@ Preserve line-breaks (Supported by Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Add a space before an anonymous function's parens, ie. function () (Supported by Pretty Diff) +Add a space before an anonymous function's parens, ie. function () (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -2393,6 +2716,32 @@ Add a space before an anonymous function's parens, ie. function () (Supported by } ``` +##### [Space before conditional](#space-before-conditional) + +**Namespace**: `js` + +**Key**: `space_before_conditional` + +**Default**: `true` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "space_before_conditional": true + } +} +``` + ##### [Space in paren](#space-in-paren) **Namespace**: `js` @@ -2401,11 +2750,11 @@ Add a space before an anonymous function's parens, ie. function () (Supported by **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Add padding spaces within paren, ie. f( a, b ) (Supported by Pretty Diff) +Add padding spaces within paren, ie. f( a, b ) (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -2417,6 +2766,179 @@ Add padding spaces within paren, ie. f( a, b ) (Supported by Pretty Diff) } ``` +##### [Unescape strings](#unescape-strings) + +**Namespace**: `js` + +**Key**: `unescape_strings` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Decode printable characters encoded in xNN notation (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "unescape_strings": false + } +} +``` + +##### [Unformatted](#unformatted) + +**Namespace**: `html` + +**Key**: `unformatted` + +**Default**: `a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del,dfn,em,embed,i,iframe,img,input,ins,kbd,keygen,label,map,mark,math,meter,noscript,object,output,progress,q,ruby,s,samp,select,small,span,strong,sub,sup,svg,template,textarea,time,u,var,video,wbr,text,acronym,address,big,dt,ins,small,strike,tt,pre,h1,h2,h3,h4,h5,h6` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to inline) that should not be reformatted (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "unformatted": [ + "a", + "abbr", + "area", + "audio", + "b", + "bdi", + "bdo", + "br", + "button", + "canvas", + "cite", + "code", + "data", + "datalist", + "del", + "dfn", + "em", + "embed", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "map", + "mark", + "math", + "meter", + "noscript", + "object", + "output", + "progress", + "q", + "ruby", + "s", + "samp", + "select", + "small", + "span", + "strong", + "sub", + "sup", + "svg", + "template", + "textarea", + "time", + "u", + "var", + "video", + "wbr", + "text", + "acronym", + "address", + "big", + "dt", + "ins", + "small", + "strike", + "tt", + "pre", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ] + } +} +``` + +##### [Wrap attributes](#wrap-attributes) + +**Namespace**: `html` + +**Key**: `wrap_attributes` + +**Default**: `auto` + +**Type**: `string` + +**Enum**: `auto` `force` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Wrap attributes to new lines [auto|force] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes": "auto" + } +} +``` + +##### [Wrap attributes indent size](#wrap-attributes-indent-size) + +**Namespace**: `html` + +**Key**: `wrap_attributes_indent_size` + +**Default**: `4` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent wrapped attributes to after N characters (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes_indent_size": 4 + } +} +``` + ##### [Wrap line length](#wrap-line-length) **Namespace**: `html` @@ -2427,11 +2949,11 @@ Add padding spaces within paren, ie. f( a, b ) (Supported by Pretty Diff) **Type**: `integer` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Maximum characters per line (0 disables) (Supported by Pretty Diff) +Maximum characters per line (0 disables) (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -5557,22 +6079,32 @@ Wrap lines at next opportunity after N characters (Supported by JS Beautify, Pre #### [JSX](#jsx) -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) -| Option | Pretty Diff | -| --- | --- | -| `disabled` | :white_check_mark: | -| `default_beautifier` | :white_check_mark: | -| `beautify_on_save` | :white_check_mark: | -| `break_chained_methods` | :white_check_mark: | -| `end_with_comma` | :white_check_mark: | -| `indent_char` | :white_check_mark: | -| `indent_size` | :white_check_mark: | -| `indent_with_tabs` | :white_check_mark: | -| `preserve_newlines` | :white_check_mark: | -| `space_after_anon_function` | :white_check_mark: | -| `space_in_paren` | :white_check_mark: | -| `wrap_line_length` | :white_check_mark: | +| Option | JS Beautify | Pretty Diff | +| --- | --- | --- | +| `disabled` | :white_check_mark: | :white_check_mark: | +| `default_beautifier` | :white_check_mark: | :white_check_mark: | +| `beautify_on_save` | :white_check_mark: | :white_check_mark: | +| `brace_style` | :white_check_mark: | :x: | +| `break_chained_methods` | :white_check_mark: | :white_check_mark: | +| `end_with_comma` | :white_check_mark: | :white_check_mark: | +| `end_with_newline` | :white_check_mark: | :x: | +| `eval_code` | :white_check_mark: | :x: | +| `indent_char` | :white_check_mark: | :white_check_mark: | +| `indent_level` | :white_check_mark: | :x: | +| `indent_size` | :white_check_mark: | :white_check_mark: | +| `indent_with_tabs` | :white_check_mark: | :white_check_mark: | +| `jslint_happy` | :white_check_mark: | :x: | +| `keep_array_indentation` | :white_check_mark: | :x: | +| `keep_function_indentation` | :white_check_mark: | :x: | +| `max_preserve_newlines` | :white_check_mark: | :x: | +| `preserve_newlines` | :white_check_mark: | :white_check_mark: | +| `space_after_anon_function` | :white_check_mark: | :white_check_mark: | +| `space_before_conditional` | :white_check_mark: | :x: | +| `space_in_paren` | :white_check_mark: | :white_check_mark: | +| `unescape_strings` | :white_check_mark: | :x: | +| `wrap_line_length` | :white_check_mark: | :white_check_mark: | **Description**: @@ -5599,11 +6131,11 @@ Disable JSX Beautification **Important**: This option is only configurable from within Atom Beautify's setting panel. -**Default**: `Pretty Diff` +**Default**: `JS Beautify` **Type**: `string` -**Enum**: `Pretty Diff` +**Enum**: `JS Beautify` `Pretty Diff` **Description**: @@ -5633,6 +6165,34 @@ Automatically beautify JSX files on save 2. Go into *Packages* and search for "*Atom Beautify*" package. 3. Find the option "*Beautify On Save*" and change it to your desired configuration. +##### [Brace style](#brace-style) + +**Namespace**: `js` + +**Key**: `brace_style` + +**Default**: `collapse` + +**Type**: `string` + +**Enum**: `collapse` `collapse-preserve-inline` `expand` `end-expand` `none` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[collapse|collapse-preserve-inline|expand|end-expand|none] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "brace_style": "collapse" + } +} +``` + ##### [Break chained methods](#break-chained-methods) **Namespace**: `js` @@ -5641,11 +6201,11 @@ Automatically beautify JSX files on save **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Break chained method calls across subsequent lines (Supported by Pretty Diff) +Break chained method calls across subsequent lines (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -5665,11 +6225,11 @@ Break chained method calls across subsequent lines (Supported by Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by Pretty Diff) +If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -5681,6 +6241,54 @@ If a terminating comma should be inserted into arrays, object literals, and dest } ``` +##### [End with newline](#end-with-newline) + +**Namespace**: `js` + +**Key**: `end_with_newline` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +End output with newline (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "end_with_newline": false + } +} +``` + +##### [Eval code](#eval-code) + +**Namespace**: `js` + +**Key**: `eval_code` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "eval_code": false + } +} +``` + ##### [Indent char](#indent-char) **Namespace**: `js` @@ -5691,11 +6299,11 @@ If a terminating comma should be inserted into arrays, object literals, and dest **Type**: `string` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Indentation character (Supported by Pretty Diff) +Indentation character (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -5707,6 +6315,30 @@ Indentation character (Supported by Pretty Diff) } ``` +##### [Indent level](#indent-level) + +**Namespace**: `js` + +**Key**: `indent_level` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Initial indentation level (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "indent_level": 0 + } +} +``` + ##### [Indent size](#indent-size) **Namespace**: `js` @@ -5717,11 +6349,11 @@ Indentation character (Supported by Pretty Diff) **Type**: `integer` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Indentation size/length (Supported by Pretty Diff) +Indentation size/length (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -5741,11 +6373,11 @@ Indentation size/length (Supported by Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by Pretty Diff) +Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -5757,6 +6389,104 @@ Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by P } ``` +##### [Jslint happy](#jslint-happy) + +**Namespace**: `js` + +**Key**: `jslint_happy` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Enable jslint-stricter mode (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "jslint_happy": false + } +} +``` + +##### [Keep array indentation](#keep-array-indentation) + +**Namespace**: `js` + +**Key**: `keep_array_indentation` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Preserve array indentation (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "keep_array_indentation": false + } +} +``` + +##### [Keep function indentation](#keep-function-indentation) + +**Namespace**: `js` + +**Key**: `keep_function_indentation` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "keep_function_indentation": false + } +} +``` + +##### [Max preserve newlines](#max-preserve-newlines) + +**Namespace**: `js` + +**Key**: `max_preserve_newlines` + +**Default**: `10` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Number of line-breaks to be preserved in one chunk (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "max_preserve_newlines": 10 + } +} +``` + ##### [Preserve newlines](#preserve-newlines) **Namespace**: `js` @@ -5767,11 +6497,11 @@ Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by P **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Preserve line-breaks (Supported by Pretty Diff) +Preserve line-breaks (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -5791,11 +6521,11 @@ Preserve line-breaks (Supported by Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Add a space before an anonymous function's parens, ie. function () (Supported by Pretty Diff) +Add a space before an anonymous function's parens, ie. function () (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -5807,6 +6537,32 @@ Add a space before an anonymous function's parens, ie. function () (Supported by } ``` +##### [Space before conditional](#space-before-conditional) + +**Namespace**: `js` + +**Key**: `space_before_conditional` + +**Default**: `true` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "space_before_conditional": true + } +} +``` + ##### [Space in paren](#space-in-paren) **Namespace**: `js` @@ -5815,11 +6571,11 @@ Add a space before an anonymous function's parens, ie. function () (Supported by **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Add padding spaces within paren, ie. f( a, b ) (Supported by Pretty Diff) +Add padding spaces within paren, ie. f( a, b ) (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -5831,6 +6587,30 @@ Add padding spaces within paren, ie. f( a, b ) (Supported by Pretty Diff) } ``` +##### [Unescape strings](#unescape-strings) + +**Namespace**: `js` + +**Key**: `unescape_strings` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Decode printable characters encoded in xNN notation (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "unescape_strings": false + } +} +``` + ##### [Wrap line length](#wrap-line-length) **Namespace**: `js` @@ -5839,11 +6619,11 @@ Add padding spaces within paren, ie. f( a, b ) (Supported by Pretty Diff) **Type**: `integer` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Wrap lines at next opportunity after N characters (Supported by Pretty Diff) +Wrap lines at next opportunity after N characters (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -14013,291 +14793,6 @@ End output with newline (Supported by JS Beautify) } ``` -##### [Indent inner html](#indent-inner-html) - -**Namespace**: `html` - -**Key**: `indent_inner_html` - -**Type**: `boolean` - -**Supported Beautifiers**: [`JS Beautify`](#js-beautify) - -**Description**: - -Indent and sections. (Supported by JS Beautify) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "html": { - "indent_inner_html": false - } -} -``` - -##### [Brace style](#brace-style) - -**Namespace**: `html` - -**Key**: `brace_style` - -**Default**: `collapse` - -**Type**: `string` - -**Enum**: `collapse` `expand` `end-expand` `none` - -**Supported Beautifiers**: [`JS Beautify`](#js-beautify) - -**Description**: - -[collapse|expand|end-expand|none] (Supported by JS Beautify) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "html": { - "brace_style": "collapse" - } -} -``` - -##### [Indent scripts](#indent-scripts) - -**Namespace**: `html` - -**Key**: `indent_scripts` - -**Default**: `normal` - -**Type**: `string` - -**Enum**: `keep` `separate` `normal` - -**Supported Beautifiers**: [`JS Beautify`](#js-beautify) - -**Description**: - -[keep|separate|normal] (Supported by JS Beautify) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "html": { - "indent_scripts": "normal" - } -} -``` - -##### [Wrap attributes](#wrap-attributes) - -**Namespace**: `html` - -**Key**: `wrap_attributes` - -**Default**: `auto` - -**Type**: `string` - -**Enum**: `auto` `force` - -**Supported Beautifiers**: [`JS Beautify`](#js-beautify) - -**Description**: - -Wrap attributes to new lines [auto|force] (Supported by JS Beautify) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "html": { - "wrap_attributes": "auto" - } -} -``` - -##### [Wrap attributes indent size](#wrap-attributes-indent-size) - -**Namespace**: `html` - -**Key**: `wrap_attributes_indent_size` - -**Default**: `4` - -**Type**: `integer` - -**Supported Beautifiers**: [`JS Beautify`](#js-beautify) - -**Description**: - -Indent wrapped attributes to after N characters (Supported by JS Beautify) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "html": { - "wrap_attributes_indent_size": 4 - } -} -``` - -##### [Max preserve newlines](#max-preserve-newlines) - -**Namespace**: `html` - -**Key**: `max_preserve_newlines` - -**Default**: `10` - -**Type**: `integer` - -**Supported Beautifiers**: [`JS Beautify`](#js-beautify) - -**Description**: - -Number of line-breaks to be preserved in one chunk (Supported by JS Beautify) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "html": { - "max_preserve_newlines": 10 - } -} -``` - -##### [Unformatted](#unformatted) - -**Namespace**: `html` - -**Key**: `unformatted` - -**Default**: `a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del,dfn,em,embed,i,iframe,img,input,ins,kbd,keygen,label,map,mark,math,meter,noscript,object,output,progress,q,ruby,s,samp,select,small,span,strong,sub,sup,svg,template,textarea,time,u,var,video,wbr,text,acronym,address,big,dt,ins,small,strike,tt,pre,h1,h2,h3,h4,h5,h6` - -**Type**: `array` - -**Supported Beautifiers**: [`JS Beautify`](#js-beautify) - -**Description**: - -List of tags (defaults to inline) that should not be reformatted (Supported by JS Beautify) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "html": { - "unformatted": [ - "a", - "abbr", - "area", - "audio", - "b", - "bdi", - "bdo", - "br", - "button", - "canvas", - "cite", - "code", - "data", - "datalist", - "del", - "dfn", - "em", - "embed", - "i", - "iframe", - "img", - "input", - "ins", - "kbd", - "keygen", - "label", - "map", - "mark", - "math", - "meter", - "noscript", - "object", - "output", - "progress", - "q", - "ruby", - "s", - "samp", - "select", - "small", - "span", - "strong", - "sub", - "sup", - "svg", - "template", - "textarea", - "time", - "u", - "var", - "video", - "wbr", - "text", - "acronym", - "address", - "big", - "dt", - "ins", - "small", - "strike", - "tt", - "pre", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6" - ] - } -} -``` - -##### [Extra liners](#extra-liners) - -**Namespace**: `html` - -**Key**: `extra_liners` - -**Default**: `head,body,/html` - -**Type**: `array` - -**Supported Beautifiers**: [`JS Beautify`](#js-beautify) - -**Description**: - -List of tags (defaults to [head,body,/html] that should have an extra newline before them. (Supported by JS Beautify) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "html": { - "extra_liners": [ - "head", - "body", - "/html" - ] - } -} -``` - ##### [Indent level](#indent-level) **Namespace**: `js` @@ -14346,6 +14841,32 @@ Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by J } ``` +##### [Max preserve newlines](#max-preserve-newlines) + +**Namespace**: `html` + +**Key**: `max_preserve_newlines` + +**Default**: `10` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Number of line-breaks to be preserved in one chunk (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "max_preserve_newlines": 10 + } +} +``` + ##### [Space in paren](#space-in-paren) **Namespace**: `js` @@ -14418,6 +14939,34 @@ Add a space before an anonymous function's parens, ie. function () (Supported by } ``` +##### [Brace style](#brace-style) + +**Namespace**: `html` + +**Key**: `brace_style` + +**Default**: `collapse` + +**Type**: `string` + +**Enum**: `collapse` `expand` `end-expand` `none` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[collapse|expand|end-expand|none] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "brace_style": "collapse" + } +} +``` + ##### [Break chained methods](#break-chained-methods) **Namespace**: `js` @@ -14588,6 +15137,237 @@ If a terminating comma should be inserted into arrays, object literals, and dest } ``` +##### [Indent inner html](#indent-inner-html) + +**Namespace**: `html` + +**Key**: `indent_inner_html` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent and sections. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_inner_html": false + } +} +``` + +##### [Indent scripts](#indent-scripts) + +**Namespace**: `html` + +**Key**: `indent_scripts` + +**Default**: `normal` + +**Type**: `string` + +**Enum**: `keep` `separate` `normal` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[keep|separate|normal] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_scripts": "normal" + } +} +``` + +##### [Wrap attributes](#wrap-attributes) + +**Namespace**: `html` + +**Key**: `wrap_attributes` + +**Default**: `auto` + +**Type**: `string` + +**Enum**: `auto` `force` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Wrap attributes to new lines [auto|force] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes": "auto" + } +} +``` + +##### [Wrap attributes indent size](#wrap-attributes-indent-size) + +**Namespace**: `html` + +**Key**: `wrap_attributes_indent_size` + +**Default**: `4` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent wrapped attributes to after N characters (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes_indent_size": 4 + } +} +``` + +##### [Unformatted](#unformatted) + +**Namespace**: `html` + +**Key**: `unformatted` + +**Default**: `a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del,dfn,em,embed,i,iframe,img,input,ins,kbd,keygen,label,map,mark,math,meter,noscript,object,output,progress,q,ruby,s,samp,select,small,span,strong,sub,sup,svg,template,textarea,time,u,var,video,wbr,text,acronym,address,big,dt,ins,small,strike,tt,pre,h1,h2,h3,h4,h5,h6` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to inline) that should not be reformatted (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "unformatted": [ + "a", + "abbr", + "area", + "audio", + "b", + "bdi", + "bdo", + "br", + "button", + "canvas", + "cite", + "code", + "data", + "datalist", + "del", + "dfn", + "em", + "embed", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "map", + "mark", + "math", + "meter", + "noscript", + "object", + "output", + "progress", + "q", + "ruby", + "s", + "samp", + "select", + "small", + "span", + "strong", + "sub", + "sup", + "svg", + "template", + "textarea", + "time", + "u", + "var", + "video", + "wbr", + "text", + "acronym", + "address", + "big", + "dt", + "ins", + "small", + "strike", + "tt", + "pre", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ] + } +} +``` + +##### [Extra liners](#extra-liners) + +**Namespace**: `html` + +**Key**: `extra_liners` + +**Default**: `head,body,/html` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to [head,body,/html] that should have an extra newline before them. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "extra_liners": [ + "head", + "body", + "/html" + ] + } +} +``` + ### Latex Beautify @@ -17040,6 +17820,35 @@ sort imports (requires isort installed) (Supported by autopep8) ``` +### beautysh + +##### [Indent size](#indent-size) + +**Namespace**: `bash` + +**Key**: `indent_size` + +**Default**: `2` + +**Type**: `integer` + +**Supported Beautifiers**: [`beautysh`](#beautysh) + +**Description**: + +Indentation size/length (Supported by beautysh) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "bash": { + "indent_size": 2 + } +} +``` + + ### clang-format ##### [Config Path](#config-path)