diff --git a/README.md b/README.md index 4a159f4..fc74dec 100644 --- a/README.md +++ b/README.md @@ -46,18 +46,18 @@ Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify` By default `Anonymous Analytics` is enabled. If you do not wish to have usage data sent to Google Analytics then please disable `Anonymous Analytics` option before using Atom-Beautify. -See [`Anonymous Analytics` section of docs](https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md#anonymous-analytics) for details. +See [`Anonymous Analytics` section of docs](docs/options.md#anonymous-analytics) for details. Thank you. ### Next Version: [Unibeautify](https://github.com/Unibeautify/unibeautify) Atom-Beautify is going to be completely rewritten with [Unibeautify](https://github.com/Unibeautify/unibeautify) at its core! -See [`unibeautify` branch](https://github.com/Glavin001/atom-beautify/tree/unibeautify) for work in progress and [Issue #1174](https://github.com/Glavin001/atom-beautify/issues/1174). +See [`unibeautify` branch](../../tree/unibeautify) for work in progress and [Issue #1174](https://github.com/Glavin001/atom-beautify/issues/1174). ## Language Support -See [all supported options in the documentation at `docs/options.md`](https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md). +See [all supported options in the documentation at `docs/options.md`](docs/options.md). | Language | Grammars | File Extensions | Supported Beautifiers | | --- | --- | --- | ---- | @@ -99,9 +99,9 @@ See [all supported options in the documentation at `docs/options.md`](https://g | OCaml | `OCaml` |`.ml` | [`ocp-indent`](https://www.typerex.org/ocp-indent.html) (Default) | | Pawn | `Pawn` | | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) | | Perl | `Perl`, `Perl 6` |`.pl` | [`Perltidy`](http://perltidy.sourceforge.net/) (Default) | -| PHP | `PHP` |`.php`, `.module`, `.inc` | [`PHP-CS-Fixer`](http://php.net/manual/en/install.php) (Default), [`PHPCBF`](http://php.net/manual/en/install.php) | +| PHP | `PHP` |`.php`, `.module`, `.inc` | [`PHP-CS-Fixer`](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (Default), [`PHPCBF`](http://php.net/manual/en/install.php) | | Puppet | `Puppet` |`.pp` | [`puppet-lint`](http://puppet-lint.com/) (Default) | -| Python | `Python` |`.py` | [`autopep8`](https://github.com/hhatto/autopep8) (Default), [`yapf`](https://github.com/google/yapf) | +| Python | `Python` |`.py` | [`autopep8`](https://github.com/hhatto/autopep8) (Default), [`pybeautifier`](https://github.com/guyskk/pybeautifier), [`yapf`](https://github.com/google/yapf) | | R | `R` |`.r`, `.R` | [`formatR`](https://github.com/yihui/formatR) (Default) | | Riot.js | `Riot.js`, `HTML (Riot Tag)` |`.tag` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | Ruby | `Ruby`, `Ruby on Rails` |`.rb` | [`Rubocop`](https://github.com/bbatsov/rubocop) (Default), [`Ruby Beautify`](https://github.com/erniebrodeur/ruby-beautify) | @@ -165,22 +165,22 @@ For example: Edit your `.jsbeautifyrc` file in any of the following locations: -- Atom Package Settings +- Atom Package Settings `Atom` ➔ `Preferences` ➔ Search for `atom-beautify` - Same directory as current file -- Project root +- 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 examples of both ways inside [`examples/`](examples) -See [all supported options in the documentation at `docs/options.md`](https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md). +See [all supported options in the documentation at `docs/options.md`](docs/options.md). ### Simple -See [examples/simple-jsbeautifyrc/.jsbeautifyrc](https://github.com/donaldpipowitch/atom-beautify/blob/master/examples/simple-jsbeautifyrc/.jsbeautifyrc). +See [examples/simple-jsbeautifyrc/.jsbeautifyrc](examples/simple-jsbeautifyrc/.jsbeautifyrc). ```json { @@ -198,7 +198,7 @@ See [examples/simple-jsbeautifyrc/.jsbeautifyrc](https://github.com/donaldpipowi ### Nested (Recommended) -See [examples/nested-jsbeautifyrc/.jsbeautifyrc](https://github.com/donaldpipowitch/atom-beautify/blob/master/examples/nested-jsbeautifyrc/.jsbeautifyrc). +See [examples/nested-jsbeautifyrc/.jsbeautifyrc](examples/nested-jsbeautifyrc/.jsbeautifyrc). ```json { @@ -236,16 +236,16 @@ See [examples/nested-jsbeautifyrc/.jsbeautifyrc](https://github.com/donaldpipowi ## Troubleshooting -See [`docs/troubleshooting.md`](https://github.com/Glavin001/atom-beautify/blob/master/docs/troubleshooting.md). +See [`docs/troubleshooting.md`](docs/troubleshooting.md). ## Contributing -[See all contributors on GitHub](https://github.com/donaldpipowitch/atom-beautify/graphs/contributors). +[See all contributors on GitHub](../../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), +Please update the [CHANGELOG.md](CHANGELOG.md), +add yourself as a contributor to the [package.json](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) +[MIT](LICENSE.md) © [Glavin Wiechert](https://github.com/Glavin001) diff --git a/docs/options.md b/docs/options.md index bcdd89e..d484f1d 100644 --- a/docs/options.md +++ b/docs/options.md @@ -8363,17 +8363,20 @@ Automatically beautify Puppet files on save #### [Python](#python) -**Supported Beautifiers**: [`autopep8`](#autopep8) [`yapf`](#yapf) +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) [`yapf`](#yapf) -| Option | autopep8 | yapf | -| --- | --- | --- | -| `disabled` | :white_check_mark: | :white_check_mark: | -| `default_beautifier` | :white_check_mark: | :white_check_mark: | -| `beautify_on_save` | :white_check_mark: | :white_check_mark: | -| `ignore` | :white_check_mark: | :x: | -| `indent_size` | :white_check_mark: | :x: | -| `max_line_length` | :white_check_mark: | :x: | -| `sort_imports` | :white_check_mark: | :x: | +| Option | autopep8 | pybeautifier | yapf | +| --- | --- | --- | --- | +| `disabled` | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| `default_beautifier` | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| `beautify_on_save` | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| `formater` | :white_check_mark: | :white_check_mark: | :x: | +| `ignore` | :white_check_mark: | :white_check_mark: | :x: | +| `indent_size` | :white_check_mark: | :white_check_mark: | :x: | +| `max_line_length` | :white_check_mark: | :white_check_mark: | :x: | +| `multi_line_output` | :white_check_mark: | :white_check_mark: | :x: | +| `sort_imports` | :white_check_mark: | :white_check_mark: | :x: | +| `style_config` | :white_check_mark: | :white_check_mark: | :x: | **Description**: @@ -8404,7 +8407,7 @@ Disable Python Beautification **Type**: `string` -**Enum**: `autopep8` `yapf` +**Enum**: `autopep8` `pybeautifier` `yapf` **Description**: @@ -8434,6 +8437,34 @@ Automatically beautify Python 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. +##### [Formater](#formater) + +**Namespace**: `python` + +**Key**: `formater` + +**Default**: `autopep8` + +**Type**: `string` + +**Enum**: `autopep8` `yapf` + +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) + +**Description**: + +formater used by pybeautifier (Supported by autopep8, pybeautifier) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "python": { + "formater": "autopep8" + } +} +``` + ##### [Ignore](#ignore) **Namespace**: `python` @@ -8444,11 +8475,11 @@ Automatically beautify Python files on save **Type**: `array` -**Supported Beautifiers**: [`autopep8`](#autopep8) +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) **Description**: -do not fix these errors/warnings (Supported by autopep8) +do not fix these errors/warnings (Supported by autopep8, pybeautifier) **Example `.jsbeautifyrc` Configuration** @@ -8472,11 +8503,11 @@ do not fix these errors/warnings (Supported by autopep8) **Type**: `integer` -**Supported Beautifiers**: [`autopep8`](#autopep8) +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) **Description**: -Indentation size/length (Supported by autopep8) +Indentation size/length (Supported by autopep8, pybeautifier) **Example `.jsbeautifyrc` Configuration** @@ -8498,11 +8529,11 @@ Indentation size/length (Supported by autopep8) **Type**: `integer` -**Supported Beautifiers**: [`autopep8`](#autopep8) +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) **Description**: -set maximum allowed line length (Supported by autopep8) +set maximum allowed line length (Supported by autopep8, pybeautifier) **Example `.jsbeautifyrc` Configuration** @@ -8514,6 +8545,34 @@ set maximum allowed line length (Supported by autopep8) } ``` +##### [Multi line output](#multi-line-output) + +**Namespace**: `python` + +**Key**: `multi_line_output` + +**Default**: `Hanging Grid Grouped` + +**Type**: `string` + +**Enum**: `Grid` `Vertical` `Hanging Indent` `Vertical Hanging Indent` `Hanging Grid` `Hanging Grid Grouped` `NOQA` + +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) + +**Description**: + +defines how from imports wrap (requires isort installed) (Supported by autopep8, pybeautifier) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "python": { + "multi_line_output": "Hanging Grid Grouped" + } +} +``` + ##### [Sort imports](#sort-imports) **Namespace**: `python` @@ -8522,11 +8581,11 @@ set maximum allowed line length (Supported by autopep8) **Type**: `boolean` -**Supported Beautifiers**: [`autopep8`](#autopep8) +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) **Description**: -sort imports (requires isort installed) (Supported by autopep8) +sort imports (requires isort installed) (Supported by autopep8, pybeautifier) **Example `.jsbeautifyrc` Configuration** @@ -8538,6 +8597,32 @@ sort imports (requires isort installed) (Supported by autopep8) } ``` +##### [Style config](#style-config) + +**Namespace**: `python` + +**Key**: `style_config` + +**Default**: `pep8` + +**Type**: `string` + +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) + +**Description**: + +formatting style used by yapf (Supported by autopep8, pybeautifier) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "python": { + "style_config": "pep8" + } +} +``` + #### [R](#r) **Supported Beautifiers**: [`formatR`](#formatr) @@ -16782,11 +16867,11 @@ List of tags (defaults to [head,body,/html] that should have an extra newline be **Type**: `integer` -**Supported Beautifiers**: [`autopep8`](#autopep8) +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) **Description**: -set maximum allowed line length (Supported by autopep8) +set maximum allowed line length (Supported by autopep8, pybeautifier) **Example `.jsbeautifyrc` Configuration** @@ -16808,11 +16893,11 @@ set maximum allowed line length (Supported by autopep8) **Type**: `integer` -**Supported Beautifiers**: [`autopep8`](#autopep8) +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) **Description**: -Indentation size/length (Supported by autopep8) +Indentation size/length (Supported by autopep8, pybeautifier) **Example `.jsbeautifyrc` Configuration** @@ -16834,11 +16919,11 @@ Indentation size/length (Supported by autopep8) **Type**: `array` -**Supported Beautifiers**: [`autopep8`](#autopep8) +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) **Description**: -do not fix these errors/warnings (Supported by autopep8) +do not fix these errors/warnings (Supported by autopep8, pybeautifier) **Example `.jsbeautifyrc` Configuration** @@ -16852,6 +16937,60 @@ do not fix these errors/warnings (Supported by autopep8) } ``` +##### [Formater](#formater) + +**Namespace**: `python` + +**Key**: `formater` + +**Default**: `autopep8` + +**Type**: `string` + +**Enum**: `autopep8` `yapf` + +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) + +**Description**: + +formater used by pybeautifier (Supported by autopep8, pybeautifier) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "python": { + "formater": "autopep8" + } +} +``` + +##### [Style config](#style-config) + +**Namespace**: `python` + +**Key**: `style_config` + +**Default**: `pep8` + +**Type**: `string` + +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) + +**Description**: + +formatting style used by yapf (Supported by autopep8, pybeautifier) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "python": { + "style_config": "pep8" + } +} +``` + ##### [Sort imports](#sort-imports) **Namespace**: `python` @@ -16860,11 +16999,11 @@ do not fix these errors/warnings (Supported by autopep8) **Type**: `boolean` -**Supported Beautifiers**: [`autopep8`](#autopep8) +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) **Description**: -sort imports (requires isort installed) (Supported by autopep8) +sort imports (requires isort installed) (Supported by autopep8, pybeautifier) **Example `.jsbeautifyrc` Configuration** @@ -16876,6 +17015,34 @@ sort imports (requires isort installed) (Supported by autopep8) } ``` +##### [Multi line output](#multi-line-output) + +**Namespace**: `python` + +**Key**: `multi_line_output` + +**Default**: `Hanging Grid Grouped` + +**Type**: `string` + +**Enum**: `Grid` `Vertical` `Hanging Indent` `Vertical Hanging Indent` `Hanging Grid` `Hanging Grid Grouped` `NOQA` + +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) + +**Description**: + +defines how from imports wrap (requires isort installed) (Supported by autopep8, pybeautifier) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "python": { + "multi_line_output": "Hanging Grid Grouped" + } +} +``` + ### coffee-fmt @@ -16985,6 +17152,195 @@ Indentation size/length (Supported by formatR) ``` +### pybeautifier + +##### [Max line length](#max-line-length) + +**Namespace**: `python` + +**Key**: `max_line_length` + +**Default**: `79` + +**Type**: `integer` + +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) + +**Description**: + +set maximum allowed line length (Supported by autopep8, pybeautifier) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "python": { + "max_line_length": 79 + } +} +``` + +##### [Indent size](#indent-size) + +**Namespace**: `python` + +**Key**: `indent_size` + +**Default**: `4` + +**Type**: `integer` + +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) + +**Description**: + +Indentation size/length (Supported by autopep8, pybeautifier) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "python": { + "indent_size": 4 + } +} +``` + +##### [Ignore](#ignore) + +**Namespace**: `python` + +**Key**: `ignore` + +**Default**: `E24` + +**Type**: `array` + +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) + +**Description**: + +do not fix these errors/warnings (Supported by autopep8, pybeautifier) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "python": { + "ignore": [ + "E24" + ] + } +} +``` + +##### [Formater](#formater) + +**Namespace**: `python` + +**Key**: `formater` + +**Default**: `autopep8` + +**Type**: `string` + +**Enum**: `autopep8` `yapf` + +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) + +**Description**: + +formater used by pybeautifier (Supported by autopep8, pybeautifier) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "python": { + "formater": "autopep8" + } +} +``` + +##### [Style config](#style-config) + +**Namespace**: `python` + +**Key**: `style_config` + +**Default**: `pep8` + +**Type**: `string` + +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) + +**Description**: + +formatting style used by yapf (Supported by autopep8, pybeautifier) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "python": { + "style_config": "pep8" + } +} +``` + +##### [Sort imports](#sort-imports) + +**Namespace**: `python` + +**Key**: `sort_imports` + +**Type**: `boolean` + +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) + +**Description**: + +sort imports (requires isort installed) (Supported by autopep8, pybeautifier) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "python": { + "sort_imports": false + } +} +``` + +##### [Multi line output](#multi-line-output) + +**Namespace**: `python` + +**Key**: `multi_line_output` + +**Default**: `Hanging Grid Grouped` + +**Type**: `string` + +**Enum**: `Grid` `Vertical` `Hanging Indent` `Vertical Hanging Indent` `Hanging Grid` `Hanging Grid Grouped` `NOQA` + +**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) + +**Description**: + +defines how from imports wrap (requires isort installed) (Supported by autopep8, pybeautifier) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "python": { + "multi_line_output": "Hanging Grid Grouped" + } +} +``` + + ### rustfmt ##### [Rustfmt path](#rustfmt-path)