Merge branch 'master' into master

This commit is contained in:
Glavin Wiechert 2017-04-15 03:10:47 -03:00 committed by GitHub
commit 22b33d1c91
99 changed files with 5927 additions and 1048 deletions

12
.codeclimate.yml Normal file
View File

@ -0,0 +1,12 @@
engines:
coffeelint:
enabled: true
eslint:
enabled: true
ratings:
paths:
- "**.coffee"
- "**.js"
exclude_paths:

View File

@ -89,7 +89,6 @@ before_install:
# Sass language support
- gem install sass
# Python language support
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo chmod 777 -R /opt/python; fi
- pip install --upgrade pip
- pip install --upgrade autopep8
@ -139,3 +138,5 @@ before_install:
- opam install --yes ocp-indent
# Crystal
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install crystal-lang; fi
# Bash
- pip install beautysh

View File

@ -1,10 +1,12 @@
# dev
- Add support for additional wrap attribute options of js-beautify (html): force-aligned and force-expand-multiline.
- Update to `remark`'s new API and fix [#1196](https://github.com/Glavin001/atom-beautify/issues/1196)
- Add beautifier for the Lua language.
- Add [ocp-indent](https://github.com/OCamlPro/ocp-indent) beautifier for the OCaml language.
- Add [elm-format](https://github.com/avh4/elm-format) beautifier for the Elm language.
- Add [clang-format](http://clang.llvm.org/docs/ClangFormat.html) beautifier for C/C++/Obj-C languages.
- Add [yapf](http://github.com/google/yapf) beautifier for Python.
- Add [ESLint](https://github.com/eslint/eslint) beautifier for Javascript
- Closes [#776] (https://github.com/Glavin001/atom-beautify/issues/776) Add support for `collapse-preserve-inline` brace_style for javascript.
- Closes [#786](https://github.com/Glavin001/atom-beautify/issues/786) YAPF configuration files are ignored.
- Fix phpcbf hanging issue by closing stdin. See [#893](https://github.com/Glavin001/atom-beautify/issues/893)

View File

@ -7,7 +7,7 @@ Before creating any new Issues, please be sure to search through the existing At
1. Generate your debugging information:
1a. In the Atom [command-palette](https://atom.io/packages/command-palette),
search for and run the command `Atom Beautify: Help Debug Editor`.
The debugging results will be copied to your clipboard.
The debugging results will be shown in a new Atom text editor tab.
1b. Create a new Gist at https://gist.github.com/
1c. Create a file in your new Gist called `debug.md`.
1d. Paste your debugging results from Atom beautify into `debug.md` file in your Gist.

View File

@ -45,5 +45,5 @@ I have:
- [ ] Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
so I know this is not a duplicate issue
- [ ] Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
- [ ] Generated debugging information and added link for `debug.md` Gist to this issue
- [ ] Generated debugging information by executing `Atom Beautify: Help Debug Editor` command in Atom and added link for `debug.md` Gist to this issue

View File

@ -20,6 +20,7 @@
## Table of Contents
- [Installation](#installation)
- [Beautifiers](#beautifiers)
- [Language Support](#language-support)
- [Usage](#usage)
- [Selection of Code](#selection-of-code)
@ -54,6 +55,11 @@ Thank you.
Atom-Beautify is going to be completely rewritten with [Unibeautify](https://github.com/Unibeautify/unibeautify) at its core!
See [`unibeautify` branch](../../tree/unibeautify) for work in progress and [Issue #1174](https://github.com/Glavin001/atom-beautify/issues/1174).
## Beautifiers
Some of the supported beautifiers are developed for Node.js and are automatically installed when Atom-Beautify is installed. However, other beautifiers are command-line interface (CLI) applications and require you to manually install them.
{{beautifiers-info beautifiers}}
## Language Support

View File

@ -20,6 +20,7 @@
## Table of Contents
- [Installation](#installation)
- [Beautifiers](#beautifiers)
- [Language Support](#language-support)
- [Usage](#usage)
- [Selection of Code](#selection-of-code)
@ -54,6 +55,55 @@ Thank you.
Atom-Beautify is going to be completely rewritten with [Unibeautify](https://github.com/Unibeautify/unibeautify) at its core!
See [`unibeautify` branch](../../tree/unibeautify) for work in progress and [Issue #1174](https://github.com/Glavin001/atom-beautify/issues/1174).
## Beautifiers
Some of the supported beautifiers are developed for Node.js and are automatically installed when Atom-Beautify is installed. However, other beautifiers are command-line interface (CLI) applications and require you to manually install them.
| Beautifier | Is Pre-Installed? | Installation Instructions |
| --- | --- | --- |
| autopep8 | :x: | Go to https://github.com/hhatto/autopep8 and follow the instructions. |
| beautysh | :x: | Go to https://github.com/bemeurer/beautysh and follow the instructions. |
| clang-format | :x: | Go to https://clang.llvm.org/docs/ClangFormat.html and follow the instructions. |
| cljfmt | :white_check_mark: | Nothing! |
| Coffee Formatter | :white_check_mark: | Nothing! |
| coffee-fmt | :white_check_mark: | Nothing! |
| Crystal | :x: | Go to http://crystal-lang.org and follow the instructions. |
| CSScomb | :white_check_mark: | Nothing! |
| dfmt | :x: | Go to https://github.com/Hackerpilot/dfmt and follow the instructions. |
| elm-format | :x: | Go to https://github.com/avh4/elm-format and follow the instructions. |
| erl_tidy | :x: | Go to http://erlang.org/doc/man/erl_tidy.html and follow the instructions. |
| ESLint Fixer | :white_check_mark: | Nothing! |
| formatR | :x: | Go to https://github.com/yihui/formatR and follow the instructions. |
| Fortran Beautifier | :x: | Go to https://www.gnu.org/software/emacs/ and follow the instructions. |
| Gherkin formatter | :white_check_mark: | Nothing! |
| gofmt | :x: | Go to https://golang.org/cmd/gofmt/ and follow the instructions. |
| hh_format | :x: | Go to http://hhvm.com/ and follow the instructions. |
| HTML Beautifier | :x: | Go to https://github.com/threedaymonk/htmlbeautifier and follow the instructions. |
| JS Beautify | :white_check_mark: | Nothing! |
| JSCS Fixer | :white_check_mark: | Nothing! |
| Latex Beautify | :x: | Go to https://github.com/cmhughes/latexindent.pl and follow the instructions. |
| Lua beautifier | :x: | Go to https://www.perl.org/ and follow the instructions. |
| Marko Beautifier | :white_check_mark: | Nothing! |
| Nginx Beautify | :white_check_mark: | Nothing! |
| ocp-indent | :x: | Go to https://www.typerex.org/ocp-indent.html and follow the instructions. |
| Perltidy | :x: | Go to http://perltidy.sourceforge.net/ and follow the instructions. |
| PHP-CS-Fixer | :x: | Go to https://github.com/FriendsOfPHP/PHP-CS-Fixer and follow the instructions. |
| PHPCBF | :x: | Go to http://php.net/manual/en/install.php and follow the instructions. |
| Pretty Diff | :white_check_mark: | Nothing! |
| Pug Beautify | :white_check_mark: | Nothing! |
| puppet-lint | :x: | Go to http://puppet-lint.com/ and follow the instructions. |
| Remark | :white_check_mark: | Nothing! |
| Rubocop | :x: | Go to https://github.com/bbatsov/rubocop and follow the instructions. |
| Ruby Beautify | :x: | Go to https://github.com/erniebrodeur/ruby-beautify and follow the instructions. |
| rustfmt | :x: | Go to https://github.com/nrc/rustfmt and follow the instructions. |
| SassConvert | :x: | Go to http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax and follow the instructions. |
| sqlformat | :x: | Go to https://github.com/andialbrecht/sqlparse and follow the instructions. |
| stylish-haskell | :x: | Go to https://github.com/jaspervdj/stylish-haskell and follow the instructions. |
| Tidy Markdown | :white_check_mark: | Nothing! |
| TypeScript Formatter | :white_check_mark: | Nothing! |
| Uncrustify | :x: | Go to https://github.com/uncrustify/uncrustify and follow the instructions. |
| Vue Beautifier | :white_check_mark: | Nothing! |
| yapf | :x: | Go to https://github.com/google/yapf and follow the instructions. |
## Language Support
@ -63,43 +113,47 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
| --- | --- | --- | ---- |
| Apex | `Apex` |`.cls`, `.trigger` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
| Arduino | `Arduino` |`.ino`, `.pde` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
| Bash | `Shell Script` |`.bash`, `.sh` | [`beautysh`](https://github.com/bemeurer/beautysh) (Default) |
| C | `C`, `opencl` |`.h`, `.c`, `.cl` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) |
| Coldfusion | `html` |`.cfm`, `.cfml`, `.cfc` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| Clojure | `Clojure` |`.clj`, `.cljs`, `.edn` | [`cljfmt`](https://github.com/snoe/node-cljfmt) (Default) |
| CoffeeScript | `CoffeeScript` |`.coffee` | [`Coffee Formatter`](https://github.com/Glavin001/Coffee-Formatter), [`coffee-fmt`](https://github.com/sterpe/coffee-fmt) (Default) |
| 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) |
| C++ | `C++` |`.h`, `.hh`, `.cc`, `.cpp`, `.cxx`, `.C`, `.cu`, `.c++`, `.hpp`, `.hxx`, `.h++`, `.cuh` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) |
| Crystal | `Crystal` |`.cr` | [`Crystal`](http://crystal-lang.org) (Default) |
| C# | `C#` |`.cs` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
| 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)` |`.ejs` | [`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://www.gnu.org/software/emacs/) (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) |
| Golang Template | `HTML (Go)`, `Go Template` |`.gohtml` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| Handlebars | `Handlebars`, `HTML (Handlebars)` |`.hbs`, `.handlebars` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
| Haskell | `Haskell` |`.hs` | [`stylish-haskell`](https://github.com/jaspervdj/stylish-haskell) (Default) |
| HTML | `HTML` |`.html` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
| Jade | `Jade`, `Pug` |`.jade`, `.pug` | [`Pug Beautify`](https://github.com/vingorius/pug-beautify) (Default) |
| 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) |
| JavaScript | `JavaScript` |`.js` | [`ESLint Fixer`](https://github.com/eslint/eslint), [`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`, `JavaScript with JSX` |`.jsx`, `.js` | [`JS Beautify`](https://github.com/beautify-web/js-beautify), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| 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) |
| Lua | `Lua` |`.lua` | [`Lua beautifier`](https://www.perl.org/) (Default) |
| Markdown | `GitHub Markdown` |`.markdown`, `.md` | [`Remark`](https://github.com/wooorm/remark), [`Tidy Markdown`](https://github.com/slang800/tidy-markdown) (Default) |
| Marko | `Marko` |`.marko` | [`Marko Beautifier`](https://github.com/marko-js/marko-prettyprint) (Default) |
| Mustache | `HTML (Mustache)` |`.mustache` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default) |
| Mustache | `HTML (Mustache)` |`.mustache` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
| Nginx | `nginx` |`.conf` | [`Nginx Beautify`](https://github.com/denysvitali/nginxbeautify) (Default) |
| Nunjucks | `Nunjucks`, `Nunjucks Templates`, `HTML (Nunjucks Templates)` |`.njk`, `.nunjucks` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| 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) |
| 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`](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (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), [`hh_format`](http://hhvm.com/) |
| Puppet | `Puppet` |`.pp` | [`puppet-lint`](http://puppet-lint.com/) (Default) |
| 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) |
@ -118,8 +172,8 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
| UX Markup | `UX` |`.ux` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| 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) |
| Vue | `Vue Component` |`.vue` | [`Vue Beautifier`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/vue-beautifier.coffee) (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

View File

@ -15,6 +15,7 @@ environment:
- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.8"
PYTHON_ARCH: "32"
RUBY_VERSION: 23
# - PYTHON: "C:\\Python27-x64"
# PYTHON_VERSION: "2.7.8"
@ -82,8 +83,7 @@ install:
- "%CMD_IN_ENV% pip install --upgrade sqlparse"
# Ruby & Gem
- cinst ruby -y
- "SET PATH=C:\\tools\\ruby23\\bin;%PATH%"
- SET PATH=C:\Ruby%RUBY_VERSION%\bin;C:\Ruby23-x64\DevKit\mingw\bin;%PATH%
# Rubocop
- gem install rubocop
- where rubocop
@ -104,9 +104,10 @@ install:
# FIXME: Enable allowEmptyChecksums, until someone fixes the checksum issue of php
- choco feature enable -n allowEmptyChecksums
# PHP
- ps: Set-Service wuauserv -StartupType Manual
- cinst php -y
- ps: "ls \"C:\\tools\\php\""
- "SET PATH=C:\\tools\\php;%PATH%"
- ps: "ls \"C:\\tools\\php71\""
- "SET PATH=C:\\tools\\php71;%PATH%"
- where php
# PHP-CS-Fixer
- cinst curl -y # Use cURL to download file from URL

View File

@ -50,6 +50,11 @@
Beautifier
</a>
</li>
<li>
<a href='class/BashBeautify.html'>
BashBeautify
</a>
</li>
<li>
<a href='class/Beautifiers.html'>
Beautifiers
@ -65,6 +70,11 @@
ClangFormat
</a>
</li>
<li>
<a href='class/Cljfmt.html'>
Cljfmt
</a>
</li>
<li>
<a href='class/CoffeeFmt.html'>
CoffeeFmt
@ -175,6 +185,11 @@
Lua
</a>
</li>
<li>
<a href='class/Languages.html'>
Languages
</a>
</li>
<li>
<a href='class/LoadingView.html'>
LoadingView
@ -380,6 +395,14 @@
(src&#47;beautifiers)
</small>
</li>
<li>
<a href='file/src/beautifiers/beautysh.coffee.html'>
beautysh.coffee
</a>
<small>
(src&#47;beautifiers)
</small>
</li>
<li>
<a href='file/src/beautify.coffee.html'>
beautify.coffee
@ -388,6 +411,14 @@
(src)
</small>
</li>
<li>
<a href='file/src/languages/bash.coffee.html'>
bash.coffee
</a>
<small>
(src&#47;languages)
</small>
</li>
</ul>
</ul>
<ul>
@ -465,6 +496,14 @@
(src&#47;languages)
</small>
</li>
<li>
<a href='file/src/languages/clojure.coffee.html'>
clojure.coffee
</a>
<small>
(src&#47;languages)
</small>
</li>
<li>
<a href='file/src/languages/coffeescript.coffee.html'>
coffeescript.coffee
@ -679,6 +718,14 @@
<ul>
<li class='letter'>i</li>
<ul>
<li>
<a href='file/src/beautifiers/cljfmt/index.coffee.html'>
index.coffee
</a>
<small>
(src&#47;beautifiers&#47;cljfmt)
</small>
</li>
<li>
<a href='file/src/beautifiers/formatR/index.coffee.html'>
index.coffee
@ -1206,6 +1253,19 @@
</li>
</ul>
</ul>
<ul>
<li class='letter'>u</li>
<ul>
<li>
<a href='file/src/languages/ux_markup.coffee.html'>
ux_markup.coffee
</a>
<small>
(src&#47;languages)
</small>
</li>
</ul>
</ul>
<ul>
<li class='letter'>v</li>
<ul>

View File

@ -0,0 +1,206 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Atom-Beautify Documentation</title>
<script src='../javascript/application.js'></script>
<script src='../javascript/search.js'></script>
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../'></div>
<div id='header'>
<div id='menu'>
<a href='../extra/README.md.html' title='Atom-Beautify'>
Atom-Beautify
</a>
&raquo;
<a href='../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>BashBeautify</span>
</div>
</div>
<div id='content'>
<h1>
Class:
BashBeautify
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;beautifiers&#47;beautysh.coffee</td>
</tr>
<tr>
<td>Inherits:</td>
<td>
<a href='../class/Beautifier.html'>Beautifier</a>
</td>
</tr>
</table>
<h2>Variables Summary</h2>
<dl class='constants'>
<dt id='name-variable'>
name
=
</dt>
<dd>
<pre><code class='coffeescript'>&quot;beautysh&quot;</code></pre>
</dd>
<dt id='link-variable'>
link
=
</dt>
<dd>
<pre><code class='coffeescript'>&quot;https:&#47;&#47;github.com&#47;bemeurer&#47;beautysh&quot;</code></pre>
</dd>
<dt id='options-variable'>
options
=
</dt>
<dd>
<pre><code class='coffeescript'>{
Bash: {
indent_size: true
}
}</code></pre>
</dd>
</dl>
<h3 class='inherited'>
Variable inherited from
<a href='../class/Beautifier.html'>Beautifier</a>
</h3>
<p class='inherited'>
<a href='../class/Beautifier.html#Promise-variable'>Promise</a>
<a href='../class/Beautifier.html#name-variable'>name</a>
<a href='../class/Beautifier.html#options-variable'>options</a>
<a href='../class/Beautifier.html#languages-variable'>languages</a>
<a href='../class/Beautifier.html#beautify-variable'>beautify</a>
<a href='../class/Beautifier.html#_envCache-variable'>_envCache</a>
<a href='../class/Beautifier.html#_envCacheDate-variable'>_envCacheDate</a>
<a href='../class/Beautifier.html#_envCacheExpiry-variable'>_envCacheExpiry</a>
<a href='../class/Beautifier.html#logger-variable'>logger</a>
</p>
<h2>Instance Method Summary</h2>
<ul class='summary'>
<li>
<span class='signature'>
<a href='#beautify-dynamic'>
#
(void)
<b>beautify</b><span>(text, language, options)</span>
</a>
</span>
<span class='desc'>
</span>
</li>
</ul>
<h2>
<small>Inherited Method Summary</small>
<h3 class='inherited'>
Methods inherited from
<a href='../class/Beautifier.html'>Beautifier</a>
</h3>
<p class='inherited'>
<a href='../class/Beautifier.html#deprecate-dynamic'>#deprecate</a>
<a href='../class/Beautifier.html#tempFile-dynamic'>#tempFile</a>
<a href='../class/Beautifier.html#readFile-dynamic'>#readFile</a>
<a href='../class/Beautifier.html#findFile-dynamic'>#findFile</a>
<a href='../class/Beautifier.html#getShellEnvironment-dynamic'>#getShellEnvironment</a>
<a href='../class/Beautifier.html#which-dynamic'>#which</a>
<a href='../class/Beautifier.html#commandNotFoundError-dynamic'>#commandNotFoundError</a>
<a href='../class/Beautifier.html#run-dynamic'>#run</a>
<a href='../class/Beautifier.html#spawn-dynamic'>#spawn</a>
<a href='../class/Beautifier.html#setupLogger-dynamic'>#setupLogger</a>
</p>
</h2>
<h2>Instance Method Details</h2>
<div class='methods'>
<div class='method_details'>
<p class='signature' id='beautify-dynamic'>
#
(void)
<b>beautify</b><span>(text, language, options)</span>
<br>
</p>
</div>
</div>
</div>
<div id='footer'>
By
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.1.2
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -36,7 +36,9 @@
<h2>Direct Known Subclasses</h2>
<p class='children'>
<a href='../class/Autopep8.html'>Autopep8</a>
<a href='../class/BashBeautify.html'>BashBeautify</a>
<a href='../class/ClangFormat.html'>ClangFormat</a>
<a href='../class/Cljfmt.html'>Cljfmt</a>
<a href='../class/CoffeeFmt.html'>CoffeeFmt</a>
<a href='../class/CoffeeFormatter.html'>CoffeeFormatter</a>
<a href='../class/Crystal.html'>Crystal</a>

View File

@ -39,12 +39,6 @@
</td>
</tr>
</table>
<h2>Overview</h2>
<div class='docstring'>
<p>Register all supported beautifiers</p>
</div>
<div class='tags'>
</div>
<h2>Variables Summary</h2>
<dl class='constants'>
<dt id='beautifierNames-variable'>
@ -52,7 +46,7 @@
=
</dt>
<dd>
<pre><code class='coffeescript'>[&#39;uncrustify&#39;, &#39;autopep8&#39;, &#39;coffee-formatter&#39;, &#39;coffee-fmt&#39;, &#39;clang-format&#39;, &#39;crystal&#39;, &#39;dfmt&#39;, &#39;elm-format&#39;, &#39;htmlbeautifier&#39;, &#39;csscomb&#39;, &#39;gherkin&#39;, &#39;gofmt&#39;, &#39;latex-beautify&#39;, &#39;fortran-beautifier&#39;, &#39;js-beautify&#39;, &#39;jscs&#39;, &#39;lua-beautifier&#39;, &#39;ocp-indent&#39;, &#39;perltidy&#39;, &#39;php-cs-fixer&#39;, &#39;phpcbf&#39;, &#39;prettydiff&#39;, &#39;pug-beautify&#39;, &#39;puppet-fix&#39;, &#39;remark&#39;, &#39;rubocop&#39;, &#39;ruby-beautify&#39;, &#39;rustfmt&#39;, &#39;sass-convert&#39;, &#39;sqlformat&#39;, &#39;stylish-haskell&#39;, &#39;tidy-markdown&#39;, &#39;typescript-formatter&#39;, &#39;vue-beautifier&#39;, &#39;yapf&#39;, &#39;erl_tidy&#39;, &#39;marko-beautifier&#39;, &#39;formatR&#39;]</code></pre>
<pre><code class='coffeescript'>[&#39;uncrustify&#39;, &#39;autopep8&#39;, &#39;coffee-formatter&#39;, &#39;coffee-fmt&#39;, &#39;cljfmt&#39;, &#39;clang-format&#39;, &#39;crystal&#39;, &#39;dfmt&#39;, &#39;elm-format&#39;, &#39;htmlbeautifier&#39;, &#39;csscomb&#39;, &#39;gherkin&#39;, &#39;gofmt&#39;, &#39;latex-beautify&#39;, &#39;fortran-beautifier&#39;, &#39;js-beautify&#39;, &#39;jscs&#39;, &#39;lua-beautifier&#39;, &#39;ocp-indent&#39;, &#39;perltidy&#39;, &#39;php-cs-fixer&#39;, &#39;phpcbf&#39;, &#39;prettydiff&#39;, &#39;pug-beautify&#39;, &#39;puppet-fix&#39;, &#39;remark&#39;, &#39;rubocop&#39;, &#39;ruby-beautify&#39;, &#39;rustfmt&#39;, &#39;sass-convert&#39;, &#39;sqlformat&#39;, &#39;stylish-haskell&#39;, &#39;tidy-markdown&#39;, &#39;typescript-formatter&#39;, &#39;vue-beautifier&#39;, &#39;yapf&#39;, &#39;erl_tidy&#39;, &#39;marko-beautifier&#39;, &#39;formatR&#39;, &#39;beautysh&#39;]</code></pre>
<div class='docstring'>
<p>List of beautifier names</p><p>To register a beautifier add its name here</p>
</div>

204
docs/code/class/Cljfmt.html Normal file
View File

@ -0,0 +1,204 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Atom-Beautify Documentation</title>
<script src='../javascript/application.js'></script>
<script src='../javascript/search.js'></script>
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../'></div>
<div id='header'>
<div id='menu'>
<a href='../extra/README.md.html' title='Atom-Beautify'>
Atom-Beautify
</a>
&raquo;
<a href='../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>Cljfmt</span>
</div>
</div>
<div id='content'>
<h1>
Class:
Cljfmt
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;beautifiers&#47;cljfmt&#47;index.coffee</td>
</tr>
<tr>
<td>Inherits:</td>
<td>
<a href='../class/Beautifier.html'>Beautifier</a>
</td>
</tr>
</table>
<h2>Variables Summary</h2>
<dl class='constants'>
<dt id='name-variable'>
name
=
</dt>
<dd>
<pre><code class='coffeescript'>&quot;cljfmt&quot;</code></pre>
</dd>
<dt id='link-variable'>
link
=
</dt>
<dd>
<pre><code class='coffeescript'>&quot;https:&#47;&#47;github.com&#47;snoe&#47;node-cljfmt&quot;</code></pre>
</dd>
<dt id='options-variable'>
options
=
</dt>
<dd>
<pre><code class='coffeescript'>{
Clojure: false
}</code></pre>
</dd>
</dl>
<h3 class='inherited'>
Variable inherited from
<a href='../class/Beautifier.html'>Beautifier</a>
</h3>
<p class='inherited'>
<a href='../class/Beautifier.html#Promise-variable'>Promise</a>
<a href='../class/Beautifier.html#name-variable'>name</a>
<a href='../class/Beautifier.html#options-variable'>options</a>
<a href='../class/Beautifier.html#languages-variable'>languages</a>
<a href='../class/Beautifier.html#beautify-variable'>beautify</a>
<a href='../class/Beautifier.html#_envCache-variable'>_envCache</a>
<a href='../class/Beautifier.html#_envCacheDate-variable'>_envCacheDate</a>
<a href='../class/Beautifier.html#_envCacheExpiry-variable'>_envCacheExpiry</a>
<a href='../class/Beautifier.html#logger-variable'>logger</a>
</p>
<h2>Instance Method Summary</h2>
<ul class='summary'>
<li>
<span class='signature'>
<a href='#beautify-dynamic'>
#
(void)
<b>beautify</b><span>(text, language, options)</span>
</a>
</span>
<span class='desc'>
</span>
</li>
</ul>
<h2>
<small>Inherited Method Summary</small>
<h3 class='inherited'>
Methods inherited from
<a href='../class/Beautifier.html'>Beautifier</a>
</h3>
<p class='inherited'>
<a href='../class/Beautifier.html#deprecate-dynamic'>#deprecate</a>
<a href='../class/Beautifier.html#tempFile-dynamic'>#tempFile</a>
<a href='../class/Beautifier.html#readFile-dynamic'>#readFile</a>
<a href='../class/Beautifier.html#findFile-dynamic'>#findFile</a>
<a href='../class/Beautifier.html#getShellEnvironment-dynamic'>#getShellEnvironment</a>
<a href='../class/Beautifier.html#which-dynamic'>#which</a>
<a href='../class/Beautifier.html#commandNotFoundError-dynamic'>#commandNotFoundError</a>
<a href='../class/Beautifier.html#run-dynamic'>#run</a>
<a href='../class/Beautifier.html#spawn-dynamic'>#spawn</a>
<a href='../class/Beautifier.html#setupLogger-dynamic'>#setupLogger</a>
</p>
</h2>
<h2>Instance Method Details</h2>
<div class='methods'>
<div class='method_details'>
<p class='signature' id='beautify-dynamic'>
#
(void)
<b>beautify</b><span>(text, language, options)</span>
<br>
</p>
</div>
</div>
</div>
<div id='footer'>
By
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.1.2
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,196 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Atom-Beautify Documentation</title>
<script src='../javascript/application.js'></script>
<script src='../javascript/search.js'></script>
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../'></div>
<div id='header'>
<div id='menu'>
<a href='../extra/README.md.html' title='Atom-Beautify'>
Atom-Beautify
</a>
&raquo;
<a href='../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>Languages</span>
</div>
</div>
<div id='content'>
<h1>
Class:
Languages
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;languages&#47;index.coffee</td>
</tr>
</table>
<h2>Variables Summary</h2>
<dl class='constants'>
<dt id='languageNames-variable'>
languageNames
=
</dt>
<dd>
<pre><code class='coffeescript'>[&quot;apex&quot;, &quot;arduino&quot;, &quot;bash&quot;, &quot;c-sharp&quot;, &quot;c&quot;, &quot;clojure&quot;, &quot;coffeescript&quot;, &quot;coldfusion&quot;, &quot;cpp&quot;, &quot;crystal&quot;, &quot;css&quot;, &quot;csv&quot;, &quot;d&quot;, &quot;ejs&quot;, &quot;elm&quot;, &quot;erb&quot;, &quot;erlang&quot;, &quot;gherkin&quot;, &quot;go&quot;, &quot;fortran&quot;, &quot;handlebars&quot;, &quot;haskell&quot;, &quot;html&quot;, &quot;jade&quot;, &quot;java&quot;, &quot;javascript&quot;, &quot;json&quot;, &quot;jsx&quot;, &quot;latex&quot;, &quot;less&quot;, &quot;lua&quot;, &quot;markdown&quot;, &#39;marko&#39;, &quot;mustache&quot;, &quot;nunjucks&quot;, &quot;objective-c&quot;, &quot;ocaml&quot;, &quot;pawn&quot;, &quot;perl&quot;, &quot;php&quot;, &quot;puppet&quot;, &quot;python&quot;, &quot;r&quot;, &quot;riotjs&quot;, &quot;ruby&quot;, &quot;rust&quot;, &quot;sass&quot;, &quot;scss&quot;, &quot;spacebars&quot;, &quot;sql&quot;, &quot;svg&quot;, &quot;swig&quot;, &quot;tss&quot;, &quot;twig&quot;, &quot;typescript&quot;, &quot;ux_markup&quot;, &quot;vala&quot;, &quot;vue&quot;, &quot;visualforce&quot;, &quot;xml&quot;, &quot;xtemplate&quot;]</code></pre>
<div class='docstring'>
<p>Supported unique configuration keys
Used for detecting nested configurations in .jsbeautifyrc</p>
</div>
<div class='tags'>
</div>
</dd>
<dt id='languages-variable'>
languages
=
</dt>
<dd>
<pre><code class='coffeescript'>null</code></pre>
<div class='docstring'>
<p>Languages</p>
</div>
<div class='tags'>
</div>
</dd>
<dt id='namespaces-variable'>
namespaces
=
</dt>
<dd>
<pre><code class='coffeescript'>null</code></pre>
<div class='docstring'>
<p>Namespaces</p>
</div>
<div class='tags'>
</div>
</dd>
</dl>
<h2>Instance Method Summary</h2>
<ul class='summary'>
<li>
<span class='signature'>
<a href='#getLanguages-dynamic'>
#
(void)
<b>getLanguages</b><span>({name, namespace, grammar, extension})</span>
</a>
</span>
<span class='desc'>
Get language for grammar and extension
</span>
</li>
</ul>
<h2>Constructor Details</h2>
<div class='methods'>
<div class='method_details'>
<p class='signature' id='constructor-dynamic'>
#
(void)
<b>constructor</b><span>()</span>
<br>
</p>
<div class='docstring'>
<p>Constructor</p>
</div>
<div class='tags'>
</div>
</div>
</div>
<h2>Instance Method Details</h2>
<div class='methods'>
<div class='method_details'>
<p class='signature' id='getLanguages-dynamic'>
#
(void)
<b>getLanguages</b><span>({name, namespace, grammar, extension})</span>
<br>
</p>
<div class='docstring'>
<p>Get language for grammar and extension</p>
</div>
<div class='tags'>
</div>
</div>
</div>
</div>
<div id='footer'>
By
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.1.2
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -132,7 +132,8 @@
}
}
],
ternaryline: &quot;preserve_ternary_lines&quot;
ternaryline: &quot;preserve_ternary_lines&quot;,
bracepadding: &quot;space_in_paren&quot;
},
&#47;*
@ -157,6 +158,7 @@
Twig: true,
LESS: true,
Swig: true,
&quot;UX Markup&quot;: true,
Visualforce: true,
&quot;Riot.js&quot;: true,
XTemplate: true

View File

@ -49,6 +49,18 @@
</small>
</li>
<li>
<a href='class/BashBeautify.html' target='main'>
BashBeautify
</a>
<small class='parent'>
<
Beautifier
</small>
<small class='namespace'>
</small>
</li>
<li>
<a href='class/ClangFormat.html' target='main'>
ClangFormat
@ -61,6 +73,18 @@
</small>
</li>
<li>
<a href='class/Cljfmt.html' target='main'>
Cljfmt
</a>
<small class='parent'>
<
Beautifier
</small>
<small class='namespace'>
</small>
</li>
<li>
<a href='class/CoffeeFmt.html' target='main'>
CoffeeFmt
@ -493,6 +517,14 @@
</small>
</li>
<li>
<a href='class/Languages.html' target='main'>
Languages
</a>
<small class='namespace'>
</small>
</li>
<li>
<a href='class/LoadingView.html' target='main'>
LoadingView

View File

@ -45,6 +45,7 @@
<li>Closes <a href="https://github.com/Glavin001/atom-beautify/issues/786">#786</a> YAPF configuration files are ignored.</li>
<li>Fix phpcbf hanging issue by closing stdin. See <a href="https://github.com/Glavin001/atom-beautify/issues/893">#893</a></li>
<li>Add warning notification when parsing <code>.jsbeautifyrc</code> as JSON or YAML fails. See <a href="https://github.com/Glavin001/atom-beautify/issues/1106">#1106</a></li>
<li>Add support for PrettyDiff&#39;s <em>bracepadding</em> option in JavaScript. See <a href="https://github.com/Glavin001/atom-beautify/issues/1157">#1157</a></li>
</ul>
<h1 id="v0-29-0">v0.29.0</h1>
<ul>

View File

@ -118,6 +118,12 @@ Thank you.</p><h2 id="language-support">Language Support</h2><p>See <a href="htt
<td><a href="https://github.com/uncrustify/uncrustify"><code>Uncrustify</code></a> (Default)</td>
</tr>
<tr>
<td>Bash</td>
<td><code>Shell Script</code></td>
<td><code>.bash</code>, <code>.sh</code></td>
<td><a href="https://github.com/bemeurer/beautysh"><code>beautysh</code></a> (Default)</td>
</tr>
<tr>
<td>C</td>
<td><code>C</code>, <code>opencl</code></td>
<td><code>.h</code>, <code>.c</code>, <code>.cl</code></td>
@ -130,6 +136,12 @@ Thank you.</p><h2 id="language-support">Language Support</h2><p>See <a href="htt
<td><a href="https://github.com/prettydiff/prettydiff"><code>Pretty Diff</code></a> (Default)</td>
</tr>
<tr>
<td>Clojure</td>
<td><code>Clojure</code></td>
<td><code>.clj</code>, <code>.cljs</code>, <code>.edn</code></td>
<td><a href="https://github.com/snoe/node-cljfmt"><code>cljfmt</code></a> (Default)</td>
</tr>
<tr>
<td>CoffeeScript</td>
<td><code>CoffeeScript</code></td>
<td><code>.coffee</code></td>
@ -257,7 +269,7 @@ Thank you.</p><h2 id="language-support">Language Support</h2><p>See <a href="htt
</tr>
<tr>
<td>JSX</td>
<td><code>JSX</code>, <code>JavaScript (JSX)</code></td>
<td><code>JSX</code>, <code>JavaScript (JSX)</code>, <code>Babel ES6 JavaScript</code></td>
<td><code>.jsx</code>, <code>.js</code></td>
<td><a href="https://github.com/prettydiff/prettydiff"><code>Pretty Diff</code></a> (Default)</td>
</tr>
@ -424,6 +436,12 @@ Thank you.</p><h2 id="language-support">Language Support</h2><p>See <a href="htt
<td><a href="https://github.com/vvakame/typescript-formatter"><code>TypeScript Formatter</code></a> (Default)</td>
</tr>
<tr>
<td>UX Markup</td>
<td><code>UX</code></td>
<td><code>.ux</code></td>
<td><a href="https://github.com/prettydiff/prettydiff"><code>Pretty Diff</code></a> (Default)</td>
</tr>
<tr>
<td>Vala</td>
<td><code>Vala</code></td>
<td><code>.vala</code>, <code>.vapi</code></td>

View File

@ -0,0 +1,123 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Atom-Beautify Documentation</title>
<script src='../../../javascript/application.js'></script>
<script src='../../../javascript/search.js'></script>
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../../extra/README.md.html' title='Atom-Beautify'>
Atom-Beautify
</a>
&raquo;
<a href='../../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>src</span>
&raquo;
<span class='title'>beautifiers</span>
&raquo;
<span class='title'>bash-beautify.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
bash-beautify.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;beautifiers</td>
</tr>
<tr>
<td>
Classes:
</td>
<td>
<a href='../../../class/BashBeautify.html'>
BashBeautify
</a>
</td>
</tr>
</table>
</div>
<div id='footer'>
By
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.1.2
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,123 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Atom-Beautify Documentation</title>
<script src='../../../javascript/application.js'></script>
<script src='../../../javascript/search.js'></script>
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../../extra/README.md.html' title='Atom-Beautify'>
Atom-Beautify
</a>
&raquo;
<a href='../../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>src</span>
&raquo;
<span class='title'>beautifiers</span>
&raquo;
<span class='title'>beautifysh.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
beautifysh.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;beautifiers</td>
</tr>
<tr>
<td>
Classes:
</td>
<td>
<a href='../../../class/BashBeautify.html'>
BashBeautify
</a>
</td>
</tr>
</table>
</div>
<div id='footer'>
By
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.1.2
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,123 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Atom-Beautify Documentation</title>
<script src='../../../javascript/application.js'></script>
<script src='../../../javascript/search.js'></script>
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../../extra/README.md.html' title='Atom-Beautify'>
Atom-Beautify
</a>
&raquo;
<a href='../../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>src</span>
&raquo;
<span class='title'>beautifiers</span>
&raquo;
<span class='title'>beautysh.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
beautysh.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;beautifiers</td>
</tr>
<tr>
<td>
Classes:
</td>
<td>
<a href='../../../class/BashBeautify.html'>
BashBeautify
</a>
</td>
</tr>
</table>
</div>
<div id='footer'>
By
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.1.2
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,125 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Atom-Beautify Documentation</title>
<script src='../../../../javascript/application.js'></script>
<script src='../../../../javascript/search.js'></script>
<link rel='stylesheet' href='../../../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../../../extra/README.md.html' title='Atom-Beautify'>
Atom-Beautify
</a>
&raquo;
<a href='../../../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>src</span>
&raquo;
<span class='title'>beautifiers</span>
&raquo;
<span class='title'>cljfmt</span>
&raquo;
<span class='title'>index.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
index.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;beautifiers&#47;cljfmt</td>
</tr>
<tr>
<td>
Classes:
</td>
<td>
<a href='../../../../class/Cljfmt.html'>
Cljfmt
</a>
</td>
</tr>
</table>
</div>
<div id='footer'>
By
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.1.2
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,162 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Atom-Beautify Documentation</title>
<script src='../../../javascript/application.js'></script>
<script src='../../../javascript/search.js'></script>
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../../extra/README.md.html' title='Atom-Beautify'>
Atom-Beautify
</a>
&raquo;
<a href='../../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>src</span>
&raquo;
<span class='title'>languages</span>
&raquo;
<span class='title'>bash.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
bash.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;languages</td>
</tr>
</table>
<h2>Variables Summary</h2>
<dl class='constants'>
<dt id='scope-variable'>
scope
=
</dt>
<dd>
<pre><code class='coffeescript'>[&#39;source.sh&#39;, &#39;source.bash&#39;]</code></pre>
</dd>
<dt id='defaultIndentSize-variable'>
defaultIndentSize
=
</dt>
<dd>
<pre><code class='coffeescript'>(softTabs ? tabLength : 1)</code></pre>
</dd>
<dt id='module.exports-variable'>
module.exports
=
</dt>
<dd>
<pre><code class='coffeescript'>{
name: &quot;Bash&quot;,
namespace: &quot;bash&quot;,
&#47;*
Supported Grammars
*&#47;
grammars: [&quot;Shell Script&quot;],
defaultBeautifier: &quot;beautysh&quot;,
&#47;*
Supported extensions
*&#47;
extensions: [&quot;bash&quot;, &quot;sh&quot;],
options: {
indent_size: {
type: &#39;integer&#39;,
&quot;default&quot;: defaultIndentSize,
minimum: 0,
description: &quot;Indentation size&#47;length&quot;
}
}
}</code></pre>
</dd>
</dl>
</div>
<div id='footer'>
By
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.1.2
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,138 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Atom-Beautify Documentation</title>
<script src='../../../javascript/application.js'></script>
<script src='../../../javascript/search.js'></script>
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../../extra/README.md.html' title='Atom-Beautify'>
Atom-Beautify
</a>
&raquo;
<a href='../../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>src</span>
&raquo;
<span class='title'>languages</span>
&raquo;
<span class='title'>clojure.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
clojure.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;languages</td>
</tr>
</table>
<h2>Variables Summary</h2>
<dl class='constants'>
<dt id='module.exports-variable'>
module.exports
=
</dt>
<dd>
<pre><code class='coffeescript'>{
name: &quot;Clojure&quot;,
namespace: &quot;clj&quot;,
&#47;*
Supported Grammars
*&#47;
grammars: [&quot;Clojure&quot;],
&#47;*
Supported extensions
*&#47;
extensions: [&#39;clj&#39;, &#39;cljs&#39;, &#39;edn&#39;],
defaultBeautifier: &quot;cljfmt&quot;
}</code></pre>
</dd>
</dl>
</div>
<div id='footer'>
By
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.1.2
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -36,6 +36,16 @@
<td>Defined in:</td>
<td>src&#47;languages</td>
</tr>
<tr>
<td>
Classes:
</td>
<td>
<a href='../../../class/Languages.html'>
Languages
</a>
</td>
</tr>
</table>
<h2>Variables Summary</h2>
<dl class='constants'>

View File

@ -52,7 +52,7 @@
&#47;*
Supported Grammars
*&#47;
grammars: [&quot;JSX&quot;, &quot;JavaScript (JSX)&quot;],
grammars: [&quot;JSX&quot;, &quot;JavaScript (JSX)&quot;, &quot;Babel ES6 JavaScript&quot;],
&#47;*
Supported extensions

View File

@ -0,0 +1,139 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Atom-Beautify Documentation</title>
<script src='../../../javascript/application.js'></script>
<script src='../../../javascript/search.js'></script>
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../../extra/README.md.html' title='Atom-Beautify'>
Atom-Beautify
</a>
&raquo;
<a href='../../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>src</span>
&raquo;
<span class='title'>languages</span>
&raquo;
<span class='title'>ux_markup.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
ux_markup.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;languages</td>
</tr>
</table>
<h2>Variables Summary</h2>
<dl class='constants'>
<dt id='module.exports-variable'>
module.exports
=
</dt>
<dd>
<pre><code class='coffeescript'>{
name: &quot;UX Markup&quot;,
namespace: &quot;ux&quot;,
fallback: [&#39;html&#39;],
&#47;*
Supported Grammars
*&#47;
grammars: [&quot;UX&quot;],
&#47;*
Supported extensions
*&#47;
extensions: [&quot;ux&quot;],
defaultBeautifier: &quot;Pretty Diff&quot;
}</code></pre>
</dd>
</dl>
</div>
<div id='footer'>
By
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.1.2
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -57,6 +57,14 @@
src&#47;beautifiers
</small>
</li>
<li>
<a href='file/src/beautifiers/beautysh.coffee.html' target='main'>
beautysh.coffee
</a>
<small class='namespace'>
src&#47;beautifiers
</small>
</li>
<li>
<a href='file/src/beautifiers/clang-format.coffee.html' target='main'>
clang-format.coffee
@ -65,6 +73,22 @@
src&#47;beautifiers
</small>
</li>
<li>
<span>
cljfmt
</span>
</li>
<ul>
<li>
<a href='file/src/beautifiers/cljfmt/index.coffee.html' target='main'>
index.coffee
</a>
<small class='namespace'>
src&#47;beautifiers&#47;cljfmt
</small>
</li>
</ul>
<li>
<a href='file/src/beautifiers/coffee-fmt.coffee.html' target='main'>
coffee-fmt.coffee
@ -441,6 +465,14 @@
src&#47;languages
</small>
</li>
<li>
<a href='file/src/languages/bash.coffee.html' target='main'>
bash.coffee
</a>
<small class='namespace'>
src&#47;languages
</small>
</li>
<li>
<a href='file/src/languages/c-sharp.coffee.html' target='main'>
c-sharp.coffee
@ -457,6 +489,14 @@
src&#47;languages
</small>
</li>
<li>
<a href='file/src/languages/clojure.coffee.html' target='main'>
clojure.coffee
</a>
<small class='namespace'>
src&#47;languages
</small>
</li>
<li>
<a href='file/src/languages/coffeescript.coffee.html' target='main'>
coffeescript.coffee
@ -857,6 +897,14 @@
src&#47;languages
</small>
</li>
<li>
<a href='file/src/languages/ux_markup.coffee.html' target='main'>
ux_markup.coffee
</a>
<small class='namespace'>
src&#47;languages
</small>
</li>
<li>
<a href='file/src/languages/vala.coffee.html' target='main'>
vala.coffee

View File

@ -11589,27 +11589,27 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
e.preventDefault();
try {
parent.frames.list.$('#search input').focus().select();
} catch (undefined) {}
} catch (error) {}
try {
return $('#search input').focus().select();
} catch (undefined) {}
} catch (error) {}
});
key('esc', function() {
try {
parent.frames.list.$('#search input').blur();
parent.frames.main.$('#help').hide();
parent.frames.main.$('#fuzzySearch').hide();
} catch (undefined) {}
} catch (error) {}
try {
parent.$("#search .active").click();
parent.$('#help').hide();
parent.$('#fuzzySearch').hide();
} catch (undefined) {}
} catch (error) {}
try {
$('#search input').blur();
$('#help').hide();
return $('#fuzzySearch').hide();
} catch (undefined) {}
} catch (error) {}
});
key('l', function() {
var body;
@ -11638,13 +11638,12 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
return loadSearch('extra_list.html', 'extra_list_link');
});
key('h', function() {
var error;
try {
return parent.frames.main.$('#help').toggle();
} catch (error) {
try {
return $('#help').toggle();
} catch (undefined) {}
} catch (error) {}
}
});
return key('t', function(e) {
@ -11652,11 +11651,11 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
try {
$('#fuzzySearch').toggle();
$('#fuzzySearch input').focus().select();
} catch (undefined) {}
} catch (error) {}
try {
parent.frames.main.$('#fuzzySearch').show();
return parent.frames.main.$('#fuzzySearch input').focus().select();
} catch (undefined) {}
} catch (error) {}
});
});

File diff suppressed because one or more lines are too long

View File

@ -38,19 +38,19 @@
</small>
</li>
<li>
<a href='class/Gofmt.html#beautify-dynamic' target='main' title='beautify'>
<a href='class/Gherkin.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(Gofmt)
(Gherkin)
</small>
</li>
<li>
<a href='class/OCPIndent.html#beautify-dynamic' target='main' title='beautify'>
<a href='class/PerlTidy.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(OCPIndent)
(PerlTidy)
</small>
</li>
<li>
@ -61,6 +61,14 @@
(src&#47;beautify.coffee)
</small>
</li>
<li>
<a href='class/OCPIndent.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(OCPIndent)
</small>
</li>
<li>
<a href='class/MarkoBeautifier.html#beautify-dynamic' target='main' title='beautify'>
#beautify
@ -85,14 +93,6 @@
(LatexBeautify)
</small>
</li>
<li>
<a href='class/Rustfmt.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(Rustfmt)
</small>
</li>
<li>
<a href='class/Autopep8.html#beautify-dynamic' target='main' title='beautify'>
#beautify
@ -102,43 +102,11 @@
</small>
</li>
<li>
<a href='class/JSCSFixer.html#beautify-dynamic' target='main' title='beautify'>
<a href='class/Sqlformat.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(JSCSFixer)
</small>
</li>
<li>
<a href='class/RubyBeautify.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(RubyBeautify)
</small>
</li>
<li>
<a href='class/JSBeautify.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(JSBeautify)
</small>
</li>
<li>
<a href='class/PHPCSFixer.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(PHPCSFixer)
</small>
</li>
<li>
<a href='class/Rubocop.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(Rubocop)
(Sqlformat)
</small>
</li>
<li>
@ -149,6 +117,30 @@
(SassConvert)
</small>
</li>
<li>
<a href='class/JSCSFixer.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(JSCSFixer)
</small>
</li>
<li>
<a href='class/JSBeautify.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(JSBeautify)
</small>
</li>
<li>
<a href='class/Rustfmt.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(Rustfmt)
</small>
</li>
<li>
<a href='class/PHPCBF.html#beautify-dynamic' target='main' title='beautify'>
#beautify
@ -157,6 +149,14 @@
(PHPCBF)
</small>
</li>
<li>
<a href='class/StylishHaskell.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(StylishHaskell)
</small>
</li>
<li>
<a href='class/PrettyDiff.html#beautify-dynamic' target='main' title='beautify'>
#beautify
@ -174,27 +174,35 @@
</small>
</li>
<li>
<a href='class/Yapf.html#beautify-dynamic' target='main' title='beautify'>
<a href='class/RubyBeautify.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(Yapf)
(RubyBeautify)
</small>
</li>
<li>
<a href='class/Sqlformat.html#beautify-dynamic' target='main' title='beautify'>
<a href='class/TidyMarkdown.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(Sqlformat)
(TidyMarkdown)
</small>
</li>
<li>
<a href='class/StylishHaskell.html#beautify-dynamic' target='main' title='beautify'>
<a href='class/BashBeautify.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(StylishHaskell)
(BashBeautify)
</small>
</li>
<li>
<a href='class/TypeScriptFormatter.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(TypeScriptFormatter)
</small>
</li>
<li>
@ -205,6 +213,14 @@
(ClangFormat)
</small>
</li>
<li>
<a href='class/Cljfmt.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(Cljfmt)
</small>
</li>
<li>
<a href='class/CoffeeFmt.html#beautify-dynamic' target='main' title='beautify'>
#beautify
@ -277,14 +293,6 @@
(FortranBeautifier)
</small>
</li>
<li>
<a href='class/Gherkin.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(Gherkin)
</small>
</li>
<li>
<a href='class/Beautifiers.html#beautify-dynamic' target='main' title='beautify'>
#beautify
@ -293,6 +301,14 @@
(Beautifiers)
</small>
</li>
<li>
<a href='class/Gofmt.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(Gofmt)
</small>
</li>
<li>
<a href='class/HTMLBeautifier.html#beautify-dynamic' target='main' title='beautify'>
#beautify
@ -301,30 +317,6 @@
(HTMLBeautifier)
</small>
</li>
<li>
<a href='class/TidyMarkdown.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(TidyMarkdown)
</small>
</li>
<li>
<a href='class/TypeScriptFormatter.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(TypeScriptFormatter)
</small>
</li>
<li>
<a href='class/Remark.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(Remark)
</small>
</li>
<li>
<a href='class/Uncrustify.html#beautify-dynamic' target='main' title='beautify'>
#beautify
@ -333,14 +325,6 @@
(Uncrustify)
</small>
</li>
<li>
<a href='class/PuppetFix.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(PuppetFix)
</small>
</li>
<li>
<a href='class/VueBeautifier.html#beautify-dynamic' target='main' title='beautify'>
#beautify
@ -350,11 +334,43 @@
</small>
</li>
<li>
<a href='class/PerlTidy.html#beautify-dynamic' target='main' title='beautify'>
<a href='class/Rubocop.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(PerlTidy)
(Rubocop)
</small>
</li>
<li>
<a href='class/Yapf.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(Yapf)
</small>
</li>
<li>
<a href='class/Remark.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(Remark)
</small>
</li>
<li>
<a href='class/PuppetFix.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(PuppetFix)
</small>
</li>
<li>
<a href='class/PHPCSFixer.html#beautify-dynamic' target='main' title='beautify'>
#beautify
</a>
<small>
(PHPCSFixer)
</small>
</li>
<li>
@ -429,6 +445,22 @@
(Beautifier)
</small>
</li>
<li>
<a href='class/Languages.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(Languages)
</small>
</li>
<li>
<a href='class/Beautifiers.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(Beautifiers)
</small>
</li>
<li>
<a href='class/MessageView.html#constructor-dynamic' target='main' title='constructor'>
#constructor
@ -446,11 +478,11 @@
</small>
</li>
<li>
<a href='class/Beautifiers.html#constructor-dynamic' target='main' title='constructor'>
#constructor
<a href='class/LoadingView.html#content-static' target='main' title='content'>
.content
</a>
<small>
(Beautifiers)
(LoadingView)
</small>
</li>
<li>
@ -461,14 +493,6 @@
(MessageView)
</small>
</li>
<li>
<a href='class/LoadingView.html#content-static' target='main' title='content'>
.content
</a>
<small>
(LoadingView)
</small>
</li>
<li>
<a href='file/src/beautify.coffee.html#debug-' target='main' title='debug'>
~debug
@ -517,14 +541,6 @@
(Beautifiers)
</small>
</li>
<li>
<a href='class/Beautifier.html#findFile-dynamic' target='main' title='findFile'>
#findFile
</a>
<small>
(Beautifier)
</small>
</li>
<li>
<a href='class/Beautifiers.html#findFile-dynamic' target='main' title='findFile'>
#findFile
@ -533,6 +549,14 @@
(Beautifiers)
</small>
</li>
<li>
<a href='class/Beautifier.html#findFile-dynamic' target='main' title='findFile'>
#findFile
</a>
<small>
(Beautifier)
</small>
</li>
<li>
<a href='class/Beautifiers.html#getBeautifierForLanguage-dynamic' target='main' title='getBeautifierForLanguage'>
#getBeautifierForLanguage
@ -581,6 +605,14 @@
(Beautifiers)
</small>
</li>
<li>
<a href='class/Languages.html#getLanguages-dynamic' target='main' title='getLanguages'>
#getLanguages
</a>
<small>
(Languages)
</small>
</li>
<li>
<a href='class/Beautifiers.html#getOptions-dynamic' target='main' title='getOptions'>
#getOptions

View File

@ -150,6 +150,31 @@ Handlebars.registerHelper('language-options-support', (languageOptions, options)
return new Handlebars.SafeString(results)
)
Handlebars.registerHelper('beautifiers-info', (beautifiers, options) ->
###
| Beautifier | Is Pre-Installed? | Installation Instructions |
| --- | ---- |
| Pretty Diff | :white_check_mark: | N/A |
| AutoPEP8 | :x: | LINK |
###
rows = _.map(beautifiers, (beautifier, k) ->
name = beautifier.name
isPreInstalled = beautifier.isPreInstalled
link = beautifier.link
installationInstructions = if isPreInstalled then "Nothing!" else "Go to #{link} and follow the instructions."
return "| #{name} | #{if isPreInstalled then ':white_check_mark:' else ':x:'} | #{installationInstructions} |"
)
results = """
| Beautifier | Is Pre-Installed? | Installation Instructions |
| --- | --- | --- |
#{rows.join('\n')}
"""
return new Handlebars.SafeString(results)
)
sortKeysBy = (obj, comparator) ->
keys = _.sortBy(_.keys(obj), (key) ->
return if comparator then comparator(obj[key], key) else key
@ -176,6 +201,7 @@ context = {
packageOptions: sortSettings(packageOptions)
languageOptions: sortSettings(languageOptions)
beautifierOptions: sortSettings(beautifierOptions)
beautifiers: _.sortBy(beautifier.beautifiers, (beautifier) -> beautifier.name.toLowerCase())
}
result = template(context)
readmeResult = readmeTemplate(context)

File diff suppressed because it is too large Load Diff

View File

@ -60,3 +60,7 @@
indent_size: 4
indent_char: " "
omit_div: true
vue:
space_before_conditional: false
space_after_anon_function: false
jslint_happy: false

View File

@ -0,0 +1,11 @@
# Displays information about the network configuration
netinfo() {
printf '--------------- Network Information ---------------\n'
/sbin/ifconfig | awk /'inet addr/ {print $2}'
/sbin/ifconfig | awk /'Bcast/ {print $3}'
/sbin/ifconfig | awk /'inet addr/ {print $4}'
/sbin/ifconfig | awk /'HWaddr/ {print $4,$5}'
myIP =$(wget -qO- http://ipecho.net/plain)
printf 'Public: %s\n' "$myIP"
printf '---------------------------------------------------'
}

View File

@ -0,0 +1,11 @@
# Displays information about the network configuration
netinfo() {
printf '--------------- Network Information ---------------\n'
/sbin/ifconfig | awk /'inet addr/ {print $2}'
/sbin/ifconfig | awk /'Bcast/ {print $3}'
/sbin/ifconfig | awk /'inet addr/ {print $4}'
/sbin/ifconfig | awk /'HWaddr/ {print $4,$5}'
myIP =$(wget -qO- http://ipecho.net/plain)
printf 'Public: %s\n' "$myIP"
printf '---------------------------------------------------'
}

View File

@ -0,0 +1,5 @@
export default {
data : function() {
return {text: 'Hello, world!'}
}
}

View File

@ -0,0 +1,7 @@
export default {
data: function () {
return {
text: 'Hello, world!'
}
}
}

View File

@ -0,0 +1,203 @@
#user html;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
error_log logs/error.log info;
#pid logs/nginx.pid;
events
{
worker_connections 1024;
}
http
{
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server
{
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location /
{
root /usr/share/nginx/html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html
{
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
server
{
listen 80;
include mime.types;
server_name dv;
location /nginxstatic/
{
alias /srv/http/dv/;
limit_rate 250k;
}
location /
{
#root /srv/http/dv/;
#index index.html;
limit_rate 1M;
#limit_conn addr 1;
proxy_pass http://localhost:3000/;
}
}
server
{
listen 80;
server_name ip.dv;
root /home/http/ip/;
include mime.types;
location /
{
try_files $uri $uri/ /index.php;
}
location ~ .php$
{
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm/socket_name.socket;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
server
{
listen 80;
server_name pma.dv;
location /
{
root /home/http/pma/;
index index.php;
}
location ~ \.php$
{
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/http/pma/$fastcgi_script_name;
include fastcgi_params;
}
}
server
{
listen 80;
server_name swissecurity.coelis;
location /
{
root /srv/http/swissecurity-fm/;
index index.html;
}
}
server
{
listen 80;
server_name p1.dv;
location /
{
proxy_pass http://127.0.0.1:1337/;
}
}
server
{
listen 80;
server_name s.dev;
location /
{
proxy_pass http://127.0.0.1:1337/;
}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}

View File

@ -0,0 +1,194 @@
#user html;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
server {
listen 80;
include mime.types;
server_name dv;
location /nginxstatic/ {
alias /srv/http/dv/;
limit_rate 250k;
}
location / {
#root /srv/http/dv/;
#index index.html;
limit_rate 1M;
#limit_conn addr 1;
proxy_pass http://localhost:3000/;
}
}
server {
listen 80;
server_name ip.dv;
root /home/http/ip/;
include mime.types;
location / {
try_files $uri $uri/ /index.php;
}
location ~ .php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm/socket_name.socket;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
server {
listen 80;
server_name pma.dv;
location / {
root /home/http/pma/;
index index.php;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/http/pma/$fastcgi_script_name;
include fastcgi_params;
}
}
server {
listen 80;
server_name swissecurity.coelis;
location / {
root /srv/http/swissecurity-fm/;
index index.html;
}
}
server {
listen 80;
server_name p1.dv;
location / {
proxy_pass http://127.0.0.1:1337/;
}
}
server { listen 80;
server_name s.dev;
location / {
proxy_pass http://127.0.0.1:1337/;
}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}

View File

@ -0,0 +1,9 @@
<script>
export default {
data: function() {
return {
text: 'Hello, world!'
}
}
}
</script>

View File

@ -0,0 +1,9 @@
<script>
export default {
data: function () {
return {
text: 'Hello, world!'
}
}
}
</script>

View File

@ -1,5 +1,34 @@
-- Ensure that that the element at i is in the right position,
-- and return a closure which can be used for continuing the sort.
local a = 'a b c'
local b = '12345678'
local c = 'a b c' + 'a b c'
local t = {
a = 1,
b = 2,
c = 3,
}
if a ~= 'a' then
local b = a
end
local e = {a = 1, b = 2}
function aaa(a, b, c)
-- comment 1
-- comment 2 1231
-- comment 1 123 123 123123 12
-- [[ comment 1 ]]
--[[
muli comments
ssss
@asdasd sad
]]
local a = -1
return a + b - c
end
local b = {a = 1, b = [[this is two space ;
]], c = 2}
function quicksorter(i, vec, low, high)
if low >= high then
return quicksorter
@ -11,10 +40,10 @@ function quicksorter(i, vec, low, high)
-- Create the promise
local function self(i, vec, low, high)
if i < middle then
left = left(i, vec, low, middle-1)
left = left(i, vec, low, middle - 1)
return self
elseif i > middle then
right = right(i, vec, middle+1, high)
right = right(i, vec, middle + 1, high)
return self
end
end

View File

@ -1,5 +1,34 @@
-- Ensure that that the element at i is in the right position,
-- and return a closure which can be used for continuing the sort.
local a= 'a b c'
local b ='12345678'
local c = 'a b c' +'a b c'
local t = {
a = 1,
b =2 ,
c= 3,
}
if a~='a' then
local b=a
end
local e={a=1,b=2}
function aaa(a,b,c)
-- comment 1
-- comment 2 1231
-- comment 1 123 123 123123 12
-- [[ comment 1 ]]
--[[
muli comments
ssss
@asdasd sad
]]
local a = -1
return a+b-c
end
local b = {a=1,b=[[this is two space ;
]],c=2}
function quicksorter(i, vec, low, high)
if low >= high then
return quicksorter
@ -18,7 +47,7 @@ right = right(i, vec, middle+1, high)
return self
end
end
-- Force the promise until i is in the right position
return self(i, vec, low, high)
end

View File

@ -1,7 +1,7 @@
{
"name": "atom-beautify",
"main": "./src/beautify",
"version": "0.29.13",
"version": "0.29.18",
"private": true,
"description": "Beautify HTML, CSS, JavaScript, PHP, Python, Ruby, Java, C, C++, C#, Objective-C, CoffeeScript, TypeScript, Coldfusion, SQL, and more in Atom",
"repository": {
@ -118,6 +118,22 @@
{
"name": "guyskk",
"url": "https://github.com/guyskk"
},
{
"name": "Denys Vitali",
"url": "https://github.com/denysvitali"
},
{
"name": "Daniel Brodin",
"url": "https://github.com/danielbrodin"
},
{
"name": "Anton Brok-Volchansky",
"url": "https://github.com/re6exp"
},
{
"name": "Taylon Silmer",
"url": "https://github.com/taylon"
}
],
"engines": {
@ -134,17 +150,18 @@
"csscomb": "^3.1.7",
"diff": "3.0.0",
"editorconfig": "^0.13.2",
"eslint": "^3.13.1",
"event-kit": "^2.1.0",
"expand-home-dir": "0.0.3",
"extend": "^3.0.0",
"gherkin": "2.12.2",
"github": "^3.1.1",
"handlebars": "^4.0.2",
"js-beautify": "^1.6.3",
"jscs": "^3.0.7",
"lodash": "^4.14.2",
"loophole": "^1.0.0",
"marko-prettyprint": "^1.2.0",
"nginxbeautify": "^2.0.0",
"node-dir": "^0.1.16",
"node-cljfmt": "^0.5.3-1",
"node-uuid": "^1.4.3",
@ -156,7 +173,7 @@
"space-pen": "^5.1.1",
"strip-json-comments": "^2.0.1",
"temp": "^0.8.3",
"tidy-markdown": "^2.0.3",
"tidy-markdown": "2.0.3",
"typescript": "^1.8.10",
"typescript-formatter": "^2.3.0",
"underscore-plus": "^1.6.6",
@ -264,6 +281,8 @@
"fortran beautifier",
"js beautify",
"jscs fixer",
"eslint",
"eslint fixer",
"lua beautifier",
"ocp-indent",
"perltidy",
@ -293,16 +312,24 @@
"nunjucks",
"ux markup",
"pybeautifier",
"cljfmt"
"cljfmt",
"bash",
"beautysh",
"glsl",
"hh_format",
"nginx",
"nginx beautify",
"golang template"
],
"devDependencies": {
"coffeelint": "^1.10.1",
"handlebars": "^4.0.2"
},
"scripts": {
"postinstall": "node script/build-options.js",
"build-options": "node script/build-options.js",
"postinstall": "npm run build-options",
"docs": "npm run build-options && coffee docs/",
"prepublish": "npm run docs",
"docs": "coffee docs/",
"lint": "coffeelint src/ spec/",
"code-docs": "codo && open docs/code/index.html"
}

View File

@ -11,6 +11,8 @@ _plus = require('underscore-plus');
require("coffee-script/register");
logger = require('../src/logger')(__filename)
Beautifiers = require("../src/beautifiers");
buildOptionsForBeautifiers = function(beautifiers, allLanguages) {
@ -209,6 +211,11 @@ buildOptionsForBeautifiers = function(beautifiers, allLanguages) {
options[field] = op;
}
}
function mergeCustomizer(objValue, srcValue) {
if (_.isArray(objValue)) {
return _.uniq(objValue.concat(srcValue));
}
}
for (j = 0, len1 = allLanguages.length; j < len1; j++) {
lang = allLanguages[j];
namespaceDest = lang.namespace;
@ -217,7 +224,7 @@ buildOptionsForBeautifiers = function(beautifiers, allLanguages) {
for (k = 0, len2 = fallback.length; k < len2; k++) {
namespaceSrc = fallback[k];
optionsSrc = _.get(langOptions, namespaceSrc + ".properties");
_.merge(optionsDest, optionsSrc);
_.mergeWith(optionsDest, optionsSrc, mergeCustomizer);
}
}
for (l = 0, len3 = beautifiers.length; l < len3; l++) {
@ -380,4 +387,4 @@ fs.writeFile(outputFilename, optionsStr, function(err) {
} else {
return console.log("Beautifier options successfully saved to " + outputFilename);
}
});
});

View File

@ -9,6 +9,7 @@ module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
isPreInstalled: false
options: {
Python: true
@ -26,8 +27,12 @@ module.exports = class Autopep8 extends Beautifier
})
.then(=>
if options.sort_imports
editor = atom.workspace.getActiveTextEditor()
filePath = editor.getPath()
projectPath = atom.project.relativizePath(filePath)[0]
@run("isort",
[tempFile],
["-sp", projectPath, tempFile],
help: {
link: "https://github.com/timothycrosley/isort"
})

View File

@ -31,6 +31,11 @@ module.exports = class Beautifier
###
options: {}
###
Is the beautifier a command-line interface beautifier?
###
isPreInstalled: true
###
Supported languages by this Beautifier

View File

@ -0,0 +1,17 @@
"use strict"
Beautifier = require('./beautifier')
module.exports = class BashBeautify extends Beautifier
name: "beautysh"
link: "https://github.com/bemeurer/beautysh"
isPreInstalled: false
options: {
Bash:
indent_size: true
}
beautify: (text, language, options) ->
file = @tempFile("input", text)
@run('beautysh', [ '-i', options.indent_size, '-f', file ], help: { link: "https://github.com/bemeurer/beautysh" })
.then(=> @readFile file)

View File

@ -11,11 +11,13 @@ module.exports = class ClangFormat extends Beautifier
name: "clang-format"
link: "https://clang.llvm.org/docs/ClangFormat.html"
isPreInstalled: false
options: {
"C++": false
"C": false
"Objective-C": false
"GLSL": true
}
###

View File

@ -8,9 +8,10 @@ Beautifier = require('./beautifier')
module.exports = class Crystal extends Beautifier
name: "Crystal"
link: "http://crystal-lang.org"
isPreInstalled: false
options: {
Crystal: true
Crystal: false
}
beautify: (text, language, options) ->

View File

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

View File

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

View File

@ -9,6 +9,7 @@ module.exports = class ErlTidy extends Beautifier
name: "erl_tidy"
link: "http://erlang.org/doc/man/erl_tidy.html"
isPreInstalled: false
options: {
Erlang: true

View File

@ -0,0 +1,33 @@
"use strict"
Beautifier = require('./beautifier')
Path = require('path')
{allowUnsafeNewFunction} = require 'loophole'
module.exports = class ESLintFixer extends Beautifier
name: "ESLint Fixer"
link: "https://github.com/eslint/eslint"
options: {
JavaScript: false
}
beautify: (text, language, options) ->
return new @Promise((resolve, reject) ->
editor = atom.workspace.getActiveTextEditor()
filePath = editor.getPath()
projectPath = atom.project.relativizePath(filePath)[0]
result = null
allowUnsafeNewFunction ->
importPath = Path.join(projectPath, 'node_modules', 'eslint')
try
CLIEngine = require(importPath).CLIEngine
cli = new CLIEngine(fix: true, cwd: projectPath)
result = cli.executeOnText(text).results[0]
resolve result.output
catch err
reject(err)
)

View File

@ -9,6 +9,7 @@ Beautifier = require('../beautifier')
module.exports = class R extends Beautifier
name: "formatR"
link: "https://github.com/yihui/formatR"
isPreInstalled: false
options: {
R: true

View File

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

View File

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

View File

@ -0,0 +1,31 @@
###
Requires http://hhvm.com/
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class HhFormat extends Beautifier
name: "hh_format"
link: "http://hhvm.com/"
isPreInstalled: false
options:
PHP: false
beautify: (text, language, options) ->
@run("hh_format", [
@tempFile("input", text)
],
{
help: {
link: "http://hhvm.com/"
}
}).then((output) ->
# hh_format can exit with status 0 and no output for some files which
# it doesn't format. In that case we just return original text.
if output.trim()
output
else
@Promise.resolve(new Error("hh_format returned an empty output."))
)

View File

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

View File

@ -43,6 +43,7 @@ module.exports = class Beautifiers extends EventEmitter
'crystal'
'dfmt'
'elm-format'
'hh_format'
'htmlbeautifier'
'csscomb'
'gherkin'
@ -51,7 +52,9 @@ module.exports = class Beautifiers extends EventEmitter
'fortran-beautifier'
'js-beautify'
'jscs'
'eslint'
'lua-beautifier'
'nginx-beautify'
'ocp-indent'
'perltidy'
'php-cs-fixer'
@ -74,6 +77,7 @@ module.exports = class Beautifiers extends EventEmitter
'erl_tidy'
'marko-beautifier'
'formatR'
'beautysh'
]
###
@ -139,20 +143,32 @@ module.exports = class Beautifiers extends EventEmitter
) or beautifiers[0]
return beautifier
getLanguage : (grammar, filePath) ->
getExtension : (filePath) ->
if filePath
return path.extname(filePath).substr(1)
getLanguages : (grammar, filePath) ->
# Get language
fileExtension = path.extname(filePath)
# Remove prefix "." (period) in fileExtension
fileExtension = fileExtension.substr(1)
languages = @languages.getLanguages({grammar, extension: fileExtension})
logger.verbose(languages, grammar, fileExtension)
# Check if unsupported language
if languages.length < 1
return null
fileExtension = @getExtension(filePath)
if fileExtension
languages = @languages.getLanguages({grammar, extension: fileExtension})
else
# TODO: select appropriate language
languages = @languages.getLanguages({grammar})
logger.verbose(languages, grammar, fileExtension)
return languages
getLanguage : (grammar, filePath) ->
languages = @getLanguages(grammar, filePath)
# Check if unsupported language
if languages.length > 0
language = languages[0]
return language
getOptionsForLanguage : (allOptions, language) ->
# Options for Language
selections = (language.fallback or []).concat([language.namespace])
@ -240,15 +256,10 @@ module.exports = class Beautifiers extends EventEmitter
logger.info('beautify', text, allOptions, grammar, filePath, onSave)
logger.verbose(allOptions)
# Get language
fileExtension = path.extname(filePath)
# Remove prefix "." (period) in fileExtension
fileExtension = fileExtension.substr(1)
languages = @languages.getLanguages({grammar, extension: fileExtension})
logger.verbose(languages, grammar, fileExtension)
language = @getLanguage(grammar, filePath)
# Check if unsupported language
if languages.length < 1
if !language
unsupportedGrammar = true
logger.verbose('Unsupported language')
@ -259,19 +270,14 @@ module.exports = class Beautifiers extends EventEmitter
# not intended to be beautified
return resolve( null )
else
# TODO: select appropriate language
language = languages[0]
logger.verbose("Language #{language.name} supported")
# Get language config
langDisabled = atom.config.get("atom-beautify.#{language.namespace}.disabled")
# Beautify!
unsupportedGrammar = false
# Check if Language is disabled
if langDisabled
logger.verbose("Language #{language.name} is disabled")
@ -369,6 +375,7 @@ module.exports = class Beautifiers extends EventEmitter
if atom.config.get("atom-beautify.general.muteUnsupportedLanguageErrors")
return resolve( null )
else
fileExtension = @getExtension(filePath)
repoBugsUrl = pkg.bugs.url
title = "Atom Beautify could not find a supported beautifier for this file"
detail = """

View File

@ -11,6 +11,8 @@ module.exports = class JSBeautify extends Beautifier
Handlebars: true
Mustache: true
JavaScript: true
EJS: true
JSX: true
JSON: true
CSS:
indent_size: true
@ -31,7 +33,7 @@ module.exports = class JSBeautify extends Beautifier
return new @Promise((resolve, reject) =>
try
switch language
when "JSON", "JavaScript"
when "JSON", "JavaScript", "JSX"
beautifyJS = require("js-beautify")
text = beautifyJS(text, options)
resolve text
@ -42,7 +44,7 @@ module.exports = class JSBeautify extends Beautifier
beautifyHTML = require("js-beautify").html
text = beautifyHTML(text, options)
resolve text
when "HTML (Liquid)", "HTML", "XML", "Web Form/Control (C#)", "Web Handler (C#)"
when "EJS", "HTML (Liquid)", "HTML", "XML", "Web Form/Control (C#)", "Web Handler (C#)"
beautifyHTML = require("js-beautify").html
text = beautifyHTML(text, options)
@debug("Beautified HTML: #{text}")
@ -51,6 +53,8 @@ module.exports = class JSBeautify extends Beautifier
beautifyCSS = require("js-beautify").css
text = beautifyCSS(text, options)
resolve text
else
reject(new Error("Unknown language for JS Beautify: "+language))
catch err
@error("JS Beautify error: #{err}")
reject(err)

View File

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

View File

@ -0,0 +1,103 @@
DEFAULT_INDENT = ' '
adjust_space = (line) ->
string_list = line.match /(['"])[^\1]*?\1/g
muli_string = line.match /\[(=*)\[([^\]\1\]]*)/
comment = line.match /\-{2}[^\[].*$/
line = line.replace /\s+/g, ' '
# replace all whitespaces inside the string with one space, WARNING: the whitespaces in string will be replace too!
line = line.replace /\s?(==|>=|<=|~=|[=><\+\*\/])\s?/g, ' $1 '
# add whitespace around the operator
line = line.replace /([^=|\-|(|\s])\s?\-\s?([^\-|\[])/g, '$1 - $2'
# just format minus, not for -- or negative number or commentary.
line = line.replace /,([^\s])/g, ', $1'
# adjust ','
line = line.replace /\s+,/g, ','
# recover the whitespaces in string.
line = line.replace /(['"])[^\1]*?\1/g, ->
string_list.shift()
if muli_string and muli_string[0]
line = line.replace /\[(=*)\[([^\]\1\]]*)/, muli_string[0]
if comment and comment[0]
line = line.replace /\-{2}[^\[].*$/, comment[0]
line
DEFAULT_WARN_FN = (msg) ->
console.log('WARNING:', msg)
module.exports = (str, indent, warn_fn) ->
indent = indent or DEFAULT_INDENT
warn_fn = if typeof warn_fn == 'function' then warn_fn else DEFAULT_WARN_FN
indent = ' '.repeat(indent) if Number.isInteger(indent)
$currIndent = 0
$nextIndent = 0
$prevLength = 0
$extIndent = 0
$lastIndent = 0
$template = 0
new_code = str.split(/\r?\n/g).map (line, line_number) ->
$template_flag = false
if $template
res2 = line.match(/\](=*)\]/)
if res2 and $template == res2[1].length + 1
$template_flag = true
if $template and !/]=*]$/.test(line)
arr = line.split(/\]=*\]/, 2)
comment = arr[0]
code = arr[1]
line = comment + ']' + '='.repeat($template - 1) + ']' + adjust_space(code)
$template = 0
$template = 0
else
return line
res1 = line.match(/\[(=*)\[/)
if res1
$template = res1[1].length + 1
if !$template_flag
line = line.trim()
# remote all spaces on both ends
line = adjust_space(line)
if !line.length
return ''
raw_line = line
line = line.replace(/(['"])[^\1]*?\1/, '')
# remove all quoted fragments for proper bracket processing
line = line.replace(/\s*--.+/, '')
# remove all comments; this ignores long bracket style comments
if /^((local )?function|repeat|while)\b/.test(line) and !/\bend\s*[\),;]*$/.test(line) or /\b(then|do)$/.test(line) and !/^elseif\b/.test(line) or /^if\b/.test(line) and /\bthen\b/.test(line) and !/\bend$/.test(line) or /\bfunction ?(?:\w+ )?\([^\)]*\)$/.test(line) and !/\bend$/.test(line)
$nextIndent = $currIndent + 1
else if /^until\b/.test(line) or /^end\s*[\),;]*$/.test(line) or /^end\s*\)\s*\.\./.test(line) or /^else(if)?\b/.test(line) and /\bend$/.test(line)
$nextIndent = --$currIndent
else if /^else\b/.test(line) or /^elseif\b/.test(line)
$nextIndent = $currIndent
$currIndent = $currIndent - 1
$brackets = (line.match(/\(/g) or []).length - ((line.match(/\)/g) or []).length)
# capture unbalanced brackets
$curly = (line.match(/\{/g) or []).length - ((line.match(/\}/g) or []).length)
# capture unbalanced curly brackets
# close (curly) brackets if needed
if $curly < 0
$currIndent += $curly
if $brackets < 0
$currIndent += $brackets
$nextIndent += $brackets + $curly
# console.log({last: $lastIndent, curr: $currIndent, next: $nextIndent, ext: $extIndent})
if $currIndent - $lastIndent > 1
$extIndent += $nextIndent - $lastIndent - 1
$nextIndent = $currIndent = 1 + $lastIndent
if $currIndent - $lastIndent < -1 and $extIndent > 0
$extIndent += $currIndent - $lastIndent + 1
$currIndent = -1 + $lastIndent
if $nextIndent < $currIndent
$nextIndent = $currIndent
# console.log({last: $lastIndent, curr: $currIndent, next: $nextIndent, ext: $extIndent})
warn_fn """negative indentation at line #{line_number}: #{raw_line}""" if $currIndent < 0
new_line = (if raw_line.length and $currIndent > 0 and !$template_flag then indent.repeat($currIndent) else '') + raw_line
$useful = $prevLength > 0 or raw_line.length > 0
$lastIndent = $currIndent
$currIndent = $nextIndent
$prevLength = raw_line.length
new_line or undefined
warn_fn 'positive indentation at the end' if $currIndent > 0
new_code.join '\n'

View File

@ -1,57 +0,0 @@
# Copyright 2011 Paul Kulchenko
# Credits: http://notebook.kulchenko.com/programming/lua-beautifier-in-55-lines-of-perl
use strict;
use warnings;
use constant INDENT => ' ';
my($currIndent, $nextIndent, $prevLength) = (0, 0, 0);
while (<>) {
chomp;
s/^\s+|\s+$//g; # remote all spaces on both ends
s/\s+/ /g; # replace all whitespaces inside the string with one space
my $orig = $_;
s/(['"])[^\1]*?\1//g; # remove all quoted fragments for proper bracket processing
s/\s*--.+//; # remove all comments; this ignores long bracket style comments
# open a level; increase next indentation; don't change current one
if (/^((local )?function|repeat|while)\b/ && !/\bend\s*[\),;]*$/
|| /\b(then|do)$/ && !/^elseif\b/ # only open on 'then' if there is no 'elseif'
|| /^if\b/ && /\bthen\b/ && !/\bend$/ # only open on 'if' if there is no 'end' at the end
|| /\bfunction\s*\([^\)]*\)$/) {
$nextIndent = $currIndent + 1;
}
# close the level; change both current and next indentation
elsif (/^until\b/
|| /^end\s*[\),;]*$/
|| /^end\s*\)\s*\.\./ # this is a special case of 'end).."some string"'
|| /^else(if)?\b/ && /\bend$/) {
$nextIndent = $currIndent = $currIndent - 1;
}
# keep the level; decrease the current indentation; keep the next one
elsif (/^else\b/
|| /^elseif\b/) {
($nextIndent, $currIndent) = ($currIndent, $currIndent-1);
}
my $brackets = y/(// - y/)//; # capture unbalanced brackets
my $curly = y/{// - y/}//; # capture unbalanced curly brackets
# close (curly) brackets if needed
$currIndent += $curly if $curly < 0 && /^\}/;
$currIndent += $brackets if $brackets < 0 && /^\)/;
warn "WARNING: negative indentation at line $.: $orig\n" if $currIndent < 0;
print((length($orig) ? (INDENT x $currIndent) : ''), $orig, "\n")
if $prevLength > 0 || length($orig) > 0; # this is to collapse empty lines
$nextIndent += $brackets + $curly;
$currIndent = $nextIndent;
$prevLength = length($orig);
}
warn "WARNING: positive indentation at the end\n" if $nextIndent > 0;

View File

@ -4,19 +4,20 @@ path = require("path")
"use strict"
Beautifier = require('../beautifier')
format = require './beautifier'
module.exports = class Lua extends Beautifier
name: "Lua beautifier"
link: "https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/lua-beautifier/beautifier.pl"
link: "https://www.perl.org/"
isPreInstalled: false
options: {
Lua: true
}
beautify: (text, language, options) ->
lua_beautifier = path.resolve(__dirname, "beautifier.pl")
@run("perl", [
lua_beautifier,
'<',
@tempFile("input", text)
])
new @Promise (resolve, reject) ->
try
resolve format text, options.indent_char.repeat options.indent_size
catch error
reject error

View File

@ -0,0 +1,36 @@
"use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
options: {
Nginx: {
spaces: ["indent_with_tabs", "indent_size", "indent_char", (indent_with_tabs, indent_size, indent_char) ->
if indent_with_tabs or indent_char is "\t"
0
else
indent_size
]
tabs: ["indent_with_tabs", "indent_size", "indent_char", (indent_with_tabs, indent_size, indent_char) ->
if indent_with_tabs or indent_char is "\t"
indent_size
else
0
]
dontJoinCurlyBracet: true
}
}
beautify: (text, language, options) ->
return new @Promise((resolve, reject) ->
Beautify = require("nginxbeautify")
instance = new Beautify(options)
try
resolve(instance.parse(text))
catch error
# Error occurred
reject(error)
)

View File

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

View File

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

View File

@ -10,6 +10,7 @@ module.exports = class PHPCSFixer extends Beautifier
name: 'PHP-CS-Fixer'
link: "https://github.com/FriendsOfPHP/PHP-CS-Fixer"
isPreInstalled: false
options:
PHP: true
@ -18,63 +19,55 @@ module.exports = class PHPCSFixer extends Beautifier
@debug('php-cs-fixer', options)
configFile = if context? and context.filePath? then @findFile(path.dirname(context.filePath), '.php_cs')
phpCsFixerOptions = [
"fix"
"--level=#{options.level}" if options.level
"--fixers=#{options.fixers}" if options.fixers
"--config-file=#{configFile}" if configFile
]
runOptions = {
ignoreReturnCode: true
help: {
link: "https://github.com/FriendsOfPHP/PHP-CS-Fixer"
}
}
if @isWindows
# Find php-cs-fixer.phar script
@Promise.all([
@which(options.cs_fixer_path) if options.cs_fixer_path
@which('php-cs-fixer')
]).then((paths) =>
@debug('php-cs-fixer paths', paths)
_ = require 'lodash'
# Get first valid, absolute path
phpCSFixerPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
@verbose('phpCSFixerPath', phpCSFixerPath)
@debug('phpCSFixerPath', phpCSFixerPath, paths)
# Check if PHP-CS-Fixer path was found
if phpCSFixerPath?
# Found PHP-CS-Fixer path
@run("php", [
phpCSFixerPath
"fix"
"--level=#{options.level}" if options.level
"--fixers=#{options.fixers}" if options.fixers
"--config-file=#{configFile}" if configFile
tempFile = @tempFile("temp", text)
], {
ignoreReturnCode: true
help: {
link: "https://github.com/FriendsOfPHP/PHP-CS-Fixer"
}
})
# Find php-cs-fixer.phar script
@Promise.all([
@which(options.cs_fixer_path) if options.cs_fixer_path
@which('php-cs-fixer')
]).then((paths) =>
@debug('php-cs-fixer paths', paths)
_ = require 'lodash'
# Get first valid, absolute path
phpCSFixerPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
@verbose('phpCSFixerPath', phpCSFixerPath)
@debug('phpCSFixerPath', phpCSFixerPath, paths)
# Check if PHP-CS-Fixer path was found
if phpCSFixerPath?
# Found PHP-CS-Fixer path
tempFile = @tempFile("temp", text)
if @isWindows
@run("php", [phpCSFixerPath, phpCsFixerOptions, tempFile], runOptions)
.then(=>
@readFile(tempFile)
)
else
@verbose('php-cs-fixer not found!')
# Could not find PHP-CS-Fixer path
@Promise.reject(@commandNotFoundError(
'php-cs-fixer'
{
@run(phpCSFixerPath, [phpCsFixerOptions, tempFile], runOptions)
.then(=>
@readFile(tempFile)
)
else
@verbose('php-cs-fixer not found!')
# Could not find PHP-CS-Fixer path
@Promise.reject(@commandNotFoundError(
'php-cs-fixer'
{
link: "https://github.com/FriendsOfPHP/PHP-CS-Fixer"
program: "php-cs-fixer.phar"
pathOption: "PHP - CS Fixer Path"
})
)
)
else
@run("php-cs-fixer", [
"fix"
"--level=#{options.level}" if options.level
"--fixers=#{options.fixers}" if options.fixers
"--config-file=#{configFile}" if configFile
tempFile = @tempFile("temp", text)
], {
ignoreReturnCode: true
help: {
link: "https://github.com/FriendsOfPHP/PHP-CS-Fixer"
}
})
.then(=>
@readFile(tempFile)
})
)
)

View File

@ -8,6 +8,7 @@ Beautifier = require('./beautifier')
module.exports = class PHPCBF extends Beautifier
name: "PHPCBF"
link: "http://php.net/manual/en/install.php"
isPreInstalled: false
options: {
_:
@ -20,6 +21,10 @@ module.exports = class PHPCBF extends Beautifier
beautify: (text, language, options) ->
@debug('phpcbf', options)
standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
standardFile = @findFile(atom.project.getPaths()[0], standardFiles);
options.standard = standardFile if standardFile
isWin = @isWindows
if isWin

View File

@ -49,6 +49,7 @@ module.exports = class PrettyDiff extends Beautifier
EJS: true
HTML: true
Handlebars: true
Mustache: true
Nunjucks: true
XML: true
SVG: true
@ -66,6 +67,7 @@ module.exports = class PrettyDiff extends Beautifier
Visualforce: true
"Riot.js": true
XTemplate: true
"Golang Template": true
}
beautify: (text, language, options) ->
@ -109,6 +111,8 @@ module.exports = class PrettyDiff extends Beautifier
lang = "scss"
when "TSS"
lang = "tss"
when "Golang Template"
lang = "go"
else
lang = "auto"

View File

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

View File

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

View File

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

View File

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

View File

@ -4,6 +4,7 @@ Beautifier = require('./beautifier')
module.exports = class SassConvert extends Beautifier
name: "SassConvert"
link: "http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax"
isPreInstalled: false
options:
# TODO: Add support for options

View File

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

View File

@ -8,6 +8,7 @@ Beautifier = require('./beautifier')
module.exports = class StylishHaskell extends Beautifier
name: "stylish-haskell"
link: "https://github.com/jaspervdj/stylish-haskell"
isPreInstalled: false
options: {
Haskell: true

View File

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

View File

@ -5,13 +5,14 @@ _ = require('lodash')
module.exports = class VueBeautifier extends Beautifier
name: "Vue Beautifier"
link: "https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/vue-beautifier.coffee"
options:
Vue: true
beautify: (text, language, options) ->
return new @Promise((resolve, reject) ->
regexp = /(<(template|script|style)[^>]*>)((\s|\S)*?)<\/\2>/gi
regexp = /(^<(template|script|style)[^>]*>)((\s|\S)*)^<\/\2>/gim
resolve(text.replace(regexp, (match, begin, type, text) ->
lang = /lang\s*=\s*['"](\w+)["']/.exec(begin)?[1]

View File

@ -9,6 +9,7 @@ module.exports = class Yapf extends Beautifier
name: "yapf"
link: "https://github.com/google/yapf"
isPreInstalled: false
options: {
Python: false
@ -23,8 +24,12 @@ module.exports = class Yapf extends Beautifier
}, ignoreReturnCode: true)
.then(=>
if options.sort_imports
editor = atom.workspace.getActiveTextEditor()
filePath = editor.getPath()
projectPath = atom.project.relativizePath(filePath)[0]
@run("isort",
[tempFile],
["-sp", projectPath, tempFile],
help: {
link: "https://github.com/timothycrosley/isort"
})

View File

@ -32,7 +32,7 @@ getScrollTop = (editor) ->
view?.getScrollTop()
setScrollTop = (editor, value) ->
view = atom.views.getView(editor)
view?.setScrollTop value
view?.component?.setScrollTop value
getCursors = (editor) ->
cursors = editor.getCursors()
@ -285,8 +285,6 @@ debug = () ->
try
open = require("open")
fs ?= require "fs"
GitHubApi = require("github")
github = new GitHubApi()
plugin.checkUnsupportedOptions()
@ -303,11 +301,7 @@ debug = () ->
if not editor?
return confirm("Active Editor not found.\n" +
"Please select a Text Editor first to beautify.")
return unless confirm('Are you ready to debug Atom Beautify?\n\n'+
'Warning: This will create an anonymous Gist on GitHub (publically accessible and cannot be easily deleted) '+
'containing the contents of your active Text Editor.\n'+
'Be sure to delete any private text from your active Text Editor before continuing '+
'to ensure you are not sharing undesirable private information.')
return unless confirm('Are you ready to debug Atom Beautify?')
debugInfo = ""
headers = []
tocEl = "<TABLEOFCONTENTS/>"
@ -474,41 +468,21 @@ debug = () ->
# Replace TABLEOFCONTENTS
debugInfo = debugInfo.replace(tocEl, toc)
# Save to clipboard
# atom.clipboard.write(debugInfo)
github.gists.create({
files: {
"debug.md": {
"content": debugInfo
}
},
public: true,
description: "Atom-Beautify debugging information"
}, (err, res) ->
# console.log(err, res)
if err
confirm("An error occurred when creating the Gist: "+err)
else
gistUrl = res.html_url
# Create Gist
open(gistUrl)
confirm("Your Atom Beautify debugging information can be found in the public Gist:\n#{res.html_url}\n\n" +
# 'You can now paste this into an Issue you are reporting here\n' +
# 'https://github.com/Glavin001/atom-beautify/issues/\n\n' +
# 'Please follow the contribution guidelines found at\n' +
# 'https://github.com/Glavin001/atom-beautify/blob/master/CONTRIBUTING.md\n\n' +
'Warning: Be sure to look over the debug info before you send it '+
'to ensure you are not sharing undesirable private information.\n\n'+
'If you want to delete this anonymous Gist read\n'+
'https://help.github.com/articles/deleting-an-anonymous-gist/'
)
# Create GitHub Issue
return unless confirm("Would you like to create a new Issue on GitHub now?")
issueTemplate = fs.readFileSync(path.resolve(__dirname, "../ISSUE_TEMPLATE.md")).toString()
body = issueTemplate.replace("<INSERT GIST HERE>", gistUrl)#.replace("<INSERT CODE HERE>", text)
open("https://github.com/Glavin001/atom-beautify/issues/new?body=#{encodeURIComponent(body)}")
# Save to new TextEditor
atom.workspace.open()
.then((editor) ->
editor.setText(debugInfo)
confirm("""Please login to GitHub and create a Gist named \"debug.md\" (Markdown file) with your debugging information.
Then add a link to your Gist in your GitHub Issue.
Thank you!
)
Gist: https://gist.github.com/
GitHub Issues: https://github.com/Glavin001/atom-beautify/issues
""")
)
.catch((error) ->
confirm("An error occurred when creating the Gist: "+error.message)
)
try
beautifier.beautify(text, allOptions, grammarName, filePath)
.then(cb)

35
src/languages/bash.coffee Normal file
View File

@ -0,0 +1,35 @@
scope = ['source.sh', 'source.bash']
tabLength = atom?.config.get('editor.tabLength', scope: scope) ? 2
softTabs = atom?.config.get('editor.softTabs', scope: scope) ? true
defaultIndentSize = (if softTabs then tabLength else 1)
module.exports = {
name: "Bash"
namespace: "bash"
###
Supported Grammars
###
grammars: [
"Shell Script"
]
defaultBeautifier: "beautysh"
###
Supported extensions
###
extensions: [
"bash"
"sh"
]
options:
indent_size:
type: 'integer'
default: defaultIndentSize
minimum: 0
description: "Indentation size/length"
}

View File

@ -20,10 +20,12 @@ module.exports = {
"cpp"
"cxx"
"C"
"cu"
"c++"
"hpp"
"hxx"
"h++"
"cuh"
]
options:

View File

@ -9,6 +9,7 @@ module.exports = {
Supported Grammars
###
grammars: [
"EJS"
"JavaScript Template"
"HTML (Angular)"
]
@ -16,7 +17,9 @@ module.exports = {
###
Supported extensions
###
extensions: []
extensions: [
"ejs"
]
options: []

View File

@ -16,6 +16,8 @@ module.exports = {
extensions: [
"f90"
"F90"
"f95"
"F95"
]
###

29
src/languages/glsl.coffee Normal file
View File

@ -0,0 +1,29 @@
module.exports = {
name: "GLSL"
namespace: "glsl"
###
Supported Grammars
###
grammars: [
"C"
"opencl"
"GLSL"
]
###
Supported extensions
###
extensions: [
"vert"
"frag"
]
options:
configPath:
type: 'string'
default: ""
description: "Path to clang-format config file. i.e. clang-format.cfg"
}

View File

@ -0,0 +1,27 @@
module.exports = {
name: "Golang Template"
description: "Comma-Separated Values"
namespace: "gohtml"
fallback: ["html"]
###
Supported Grammars
###
grammars: [
"HTML (Go)",
"Go Template"
]
###
Supported extensions
###
extensions: [
'gohtml'
]
defaultBeautifier: "Pretty Diff"
options: []
}

View File

@ -56,8 +56,8 @@ module.exports = {
wrap_attributes:
type: 'string'
default: "auto"
enum: ["auto", "force"]
description: "Wrap attributes to new lines [auto|force]"
enum: ["auto", "force", "force-aligned", "force-expand-multiline"]
description: "Wrap attributes to new lines [auto|force|force-aligned|force-expand-multiline]"
wrap_attributes_indent_size:
type: 'integer'
default: defaultIndentSize

View File

@ -14,6 +14,7 @@ module.exports = class Languages
languageNames: [
"apex"
"arduino"
"bash"
"c-sharp"
"c"
"clojure"
@ -29,7 +30,9 @@ module.exports = class Languages
"erb"
"erlang"
"gherkin"
"glsl"
"go"
"gohtml"
"fortran"
"handlebars"
"haskell"
@ -45,6 +48,7 @@ module.exports = class Languages
"markdown"
'marko'
"mustache"
"nginx"
"nunjucks"
"objective-c"
"ocaml"

View File

@ -11,6 +11,7 @@ module.exports = {
"JSX"
"JavaScript (JSX)"
"Babel ES6 JavaScript"
"JavaScript with JSX"
]
###
@ -21,4 +22,12 @@ module.exports = {
"js"
]
defaultBeautifier: "Pretty Diff"
options:
e4x:
type: 'boolean'
default: true
description: "Support e4x/jsx syntax"
}

View File

@ -0,0 +1,49 @@
# Get Atom defaults
scope = ['source.conf']
tabLength = atom?.config.get('editor.tabLength', scope: scope) ? 4
softTabs = atom?.config.get('editor.softTabs', scope: scope) ? true
defaultIndentSize = (if softTabs then tabLength else 1)
defaultIndentChar = (if softTabs then " " else "\t")
defaultIndentWithTabs = not softTabs
module.exports = {
name: "Nginx"
namespace: "nginx"
###
Supported Grammars
###
grammars: [
"nginx"
]
###
Supported extensions
###
extensions: [
"conf"
]
defaultBeautifier: "Nginx Beautify"
options:
indent_size:
type: 'integer'
default: defaultIndentSize
minimum: 0
description: "Indentation size/length"
indent_char:
type: 'string'
default: defaultIndentChar
description: "Indentation character"
indent_with_tabs:
type: 'boolean'
default: defaultIndentWithTabs
description: "Indentation uses tabs, overrides `Indent Size` and `Indent Char`"
dontJoinCurlyBracet:
title: "Don't join curly brackets"
type: "boolean"
default: true
descriotion: ""
}

View File

@ -1,4 +1,3 @@
console.log('loading nunjucks')
module.exports = {

View File

@ -19,6 +19,8 @@ module.exports = {
"inc"
]
defaultBeautifier: "PHP-CS-Fixer"
options:
cs_fixer_path:
title: "PHP-CS-Fixer Path"
@ -42,6 +44,6 @@ module.exports = {
title: "PHPCBF Standard"
type: 'string'
default: "",
description: "Standard name Squiz, PSR2, PSR1, PHPCS, PEAR, Zend, MySource... or path to CS rules"
description: "Standard name Squiz, PSR2, PSR1, PHPCS, PEAR, Zend, MySource... or path to CS rules. Will use local `phpcs.xml`, `phpcs.xml.dist`, `phpcs.ruleset.xml` or `ruleset.xml` if found in the project root."
}

View File

@ -2,7 +2,7 @@ module.exports = {
name: "Vue"
namespace: "vue"
fallback: ['html']
fallback: ['html', 'js']
###
Supported Grammars

View File

@ -16,7 +16,7 @@ module.exports = {
Supported extensions
###
extensions: [
'sld', 'xml', 'xhtml', 'xsd', 'xsl', 'jsp', 'gsp'
'sld', 'xml', 'xhtml', 'xsd', 'xsl', 'jsp', 'gsp', 'plist', 'recipe'
]
defaultBeautifier: "Pretty Diff"