Merge branch 'master' of https://github.com/Tehnix/atom-beautify into Tehnix-master

This commit is contained in:
Glavin Wiechert 2018-03-01 20:27:34 -04:00
commit 5edfb25971
21 changed files with 944 additions and 53 deletions

View File

@ -1,6 +1,8 @@
# Next
- Add hindent and brittany beautifiers for haskell
- Breaking change to `pybeautifier`: Fix typo, change `formater` to `formatter`. See [#1898](https://github.com/Glavin001/atom-beautify/pull/1898).
- Fixes [#1773](https://github.com/Glavin001/atom-beautify/issues/1773) and [#793](https://github.com/Glavin001/atom-beautify/issues/793). ruby-beautify with Rubocop now respects `Exclude` settings, and properly loads inherited config files (like `~/.rubocop.yml`)
- Add hindent and brittany beautifiers for haskell
- Fix [#1862](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for ocp-indent as an executable
- See [#601](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for tsx files
- See [#1497](https://github.com/Glavin001/atom-beautify/issues/1497) and [#802](https://github.com/Glavin001/atom-beautify/issues/802)

View File

@ -91,6 +91,7 @@ Some of the supported beautifiers are developed for Node.js and are automaticall
| align-yaml | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| autopep8 | :warning: 2 executables | :warning: Only 1 of 2 executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [autopep8 (`autopep8`)](https://github.com/hhatto/autopep8) with `docker pull unibeautify/autopep8`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [autopep8 (`autopep8`)](https://github.com/hhatto/autopep8) by following https://github.com/hhatto/autopep8#installation<br/>2. Install [isort (`isort`)](https://github.com/timothycrosley/isort) by following https://github.com/timothycrosley/isort#installing-isort<br/> |
| beautysh | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [beautysh (`beautysh`)](https://github.com/bemeurer/beautysh) with `docker pull unibeautify/beautysh`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [beautysh (`beautysh`)](https://github.com/bemeurer/beautysh) by following https://github.com/bemeurer/beautysh#installation<br/> |
| brittany | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/lspitzner/brittany and follow the instructions. |
| clang-format | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [ClangFormat (`clang-format`)](https://clang.llvm.org/docs/ClangFormat.html) with `docker pull unibeautify/clang-format`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [ClangFormat (`clang-format`)](https://clang.llvm.org/docs/ClangFormat.html) by following https://clang.llvm.org/docs/ClangFormat.html<br/> |
| cljfmt | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| Coffee Formatter | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
@ -107,6 +108,7 @@ Some of the supported beautifiers are developed for Node.js and are automaticall
| gofmt | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://golang.org/cmd/gofmt/ and follow the instructions. |
| goimports | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [goimports (`goimports`)](https://godoc.org/golang.org/x/tools/cmd/goimports) with `docker pull unibeautify/goimports`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [goimports (`goimports`)](https://godoc.org/golang.org/x/tools/cmd/goimports) by following https://godoc.org/golang.org/x/tools/cmd/goimports<br/> |
| hh_format | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to http://hhvm.com/ and follow the instructions. |
| hindent | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/commercialhaskell/hindent and follow the instructions. |
| HTML Beautifier | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/threedaymonk/htmlbeautifier and follow the instructions. |
| JS Beautify | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| JSCS Fixer | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
@ -166,7 +168,7 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
| Go | `Go` |`.go` | **[`gofmt`](https://golang.org/cmd/gofmt/)**, [`goimports`](https://godoc.org/golang.org/x/tools/cmd/goimports) |
| Golang Template | `HTML (Go)`, `Go Template` |`.gohtml` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
| Handlebars | `Handlebars`, `HTML (Handlebars)` |`.hbs`, `.handlebars` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
| Haskell | `Haskell` |`.hs` | **[`stylish-haskell`](https://github.com/jaspervdj/stylish-haskell)** |
| Haskell | `Haskell` |`.hs` | **[`brittany`](https://github.com/lspitzner/brittany)**, [`hindent`](https://github.com/commercialhaskell/hindent), [`stylish-haskell`](https://github.com/jaspervdj/stylish-haskell) |
| HTML | `HTML` |`.html` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
| Jade | `Jade`, `Pug` |`.jade`, `.pug` | **[`Pug Beautify`](https://github.com/vingorius/pug-beautify)** |
| Java | `Java` |`.java` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)** |

View File

@ -60,6 +60,11 @@
Beautifiers
</a>
</li>
<li>
<a href='class/Brittany.html'>
Brittany
</a>
</li>
</ul>
</ul>
<ul>
@ -150,6 +155,11 @@
HTMLBeautifier
</a>
</li>
<li>
<a href='class/Hindent.html'>
Hindent
</a>
</li>
</ul>
</ul>
<ul>
@ -419,6 +429,15 @@
(src&#47;languages)
</small>
</li>
<li>
<a href='file/src/beautifiers/brittany.coffee.html'>
brittany.coffee
</a>
<small>
(src&#47;beautifiers)
</small>
</li>
</ul>
</ul>
<ul>
@ -713,6 +732,15 @@
(src&#47;languages)
</small>
</li>
<li>
<a href='file/src/beautifiers/hindent.coffee.html'>
hindent.coffee
</a>
<small>
(src&#47;beautifiers)
</small>
</li>
</ul>
</ul>
<ul>
@ -1412,4 +1440,4 @@
</ul>
</div>
</body>
</html>
</html>

View File

@ -46,7 +46,7 @@
=
</dt>
<dd>
<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>
<pre><code class='coffeescript'>[&#39;uncrustify&#39;, &#39;autopep8&#39;, &#39;brittany&#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;hindent&#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>
@ -83,7 +83,7 @@
</dt>
<dd>
<pre><code class='coffeescript'>{}</code></pre>
</dd>
</dl>
<h2>Instance Method Summary</h2>
@ -97,7 +97,7 @@
</a>
</span>
<span class='desc'>
From <a href="https://github.com/atom/notifications/blob/01779ade79e7196f1603b8c1fa31716aa4a33911/lib/notification-issue.coffee#L130">https://github.com/atom/notifications/blob/01779ade79e7196f1603b8c1fa31716aa4a33911/lib/notification-issue.coffee#L130</a>
From <a href="https://github.com/atom/notifications/blob/01779ade79e7196f1603b8c1fa31716aa4a33911/lib/notification-issue.coffee#L130">https://github.com/atom/notifications/blob/01779ade79e7196f1603b8c1fa31716aa4a33911/lib/notification-issue.coffee#L130</a>
</span>
</li>
<li>
@ -208,7 +208,7 @@
</a>
</span>
<span class='desc'>
CLI
CLI
</span>
</li>
<li>
@ -269,7 +269,7 @@ lookups when liniting an entire project
</a>
</span>
<span class='desc'>
Look for .jsbeautifierrc in file and home path, check env variables
Look for .jsbeautifierrc in file and home path, check env variables
</span>
</li>
<li>
@ -345,7 +345,7 @@ lookups when liniting an entire project
<b>getBeautifiers</b><span>(language)</span>
<br>
</p>
</div>
<div class='method_details'>
<p class='signature' id='getBeautifierForLanguage-dynamic'>
@ -354,7 +354,7 @@ lookups when liniting an entire project
<b>getBeautifierForLanguage</b><span>(language)</span>
<br>
</p>
</div>
<div class='method_details'>
<p class='signature' id='getLanguage-dynamic'>
@ -363,7 +363,7 @@ lookups when liniting an entire project
<b>getLanguage</b><span>(grammar, filePath)</span>
<br>
</p>
</div>
<div class='method_details'>
<p class='signature' id='getOptionsForLanguage-dynamic'>
@ -372,7 +372,7 @@ lookups when liniting an entire project
<b>getOptionsForLanguage</b><span>(allOptions, language)</span>
<br>
</p>
</div>
<div class='method_details'>
<p class='signature' id='transformOptions-dynamic'>
@ -381,7 +381,7 @@ lookups when liniting an entire project
<b>transformOptions</b><span>(beautifier, languageName, options)</span>
<br>
</p>
</div>
<div class='method_details'>
<p class='signature' id='trackEvent-dynamic'>
@ -390,7 +390,7 @@ lookups when liniting an entire project
<b>trackEvent</b><span>(payload)</span>
<br>
</p>
</div>
<div class='method_details'>
<p class='signature' id='trackTiming-dynamic'>
@ -399,7 +399,7 @@ lookups when liniting an entire project
<b>trackTiming</b><span>(payload)</span>
<br>
</p>
</div>
<div class='method_details'>
<p class='signature' id='track-dynamic'>
@ -408,7 +408,7 @@ lookups when liniting an entire project
<b>track</b><span>(type, payload)</span>
<br>
</p>
</div>
<div class='method_details'>
<p class='signature' id='beautify-dynamic'>
@ -417,7 +417,7 @@ lookups when liniting an entire project
<b>beautify</b><span>(text, allOptions, grammar, filePath, {onSave} = {})</span>
<br>
</p>
</div>
<div class='method_details'>
<p class='signature' id='getUserHome-dynamic'>
@ -439,7 +439,7 @@ lookups when liniting an entire project
<b>verifyExists</b><span>(fullPath)</span>
<br>
</p>
</div>
<div class='method_details'>
<p class='signature' id='findFile-dynamic'>
@ -511,7 +511,7 @@ or in the home directory. Configuration files are named
<b>getConfigOptionsFromSettings</b><span>(langs)</span>
<br>
</p>
</div>
<div class='method_details'>
<p class='signature' id='getConfig-dynamic'>
@ -533,7 +533,7 @@ or in the home directory. Configuration files are named
<b>getOptionsForPath</b><span>(editedFilePath, editor)</span>
<br>
</p>
</div>
<div class='method_details'>
<p class='signature' id='isNestedOptions-dynamic'>
@ -542,7 +542,7 @@ or in the home directory. Configuration files are named
<b>isNestedOptions</b><span>(currOptions)</span>
<br>
</p>
</div>
<div class='method_details'>
<p class='signature' id='getOptions-dynamic'>
@ -552,7 +552,7 @@ or in the home directory. Configuration files are named
<span class='bound note'>Bound</span>
<br>
</p>
</div>
</div>
</div>
@ -628,4 +628,4 @@ or in the home directory. Configuration files are named
</ul>
</div>
</body>
</html>
</html>

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'>Brittany</span>
</div>
</div>
<div id='content'>
<h1>
Class:
Brittany
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;beautifiers&#47;brittany.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;brittany&quot;</code></pre>
</dd>
<dt id='link-variable'>
link
=
</dt>
<dd>
<pre><code class='coffeescript'>&quot;https:&#47;&#47;github.com&#47;lspitzner&#47;brittany&quot;</code></pre>
</dd>
<dt id='options-variable'>
options
=
</dt>
<dd>
<pre><code class='coffeescript'>{
Haskell: 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

@ -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'>Hindent</span>
</div>
</div>
<div id='content'>
<h1>
Class:
Hindent
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;beautifiers&#47;hindent.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;hindent&quot;</code></pre>
</dd>
<dt id='link-variable'>
link
=
</dt>
<dd>
<pre><code class='coffeescript'>&quot;https:&#47;&#47;github.com&#47;commercialhaskell&#47;hindent&quot;</code></pre>
</dd>
<dt id='options-variable'>
options
=
</dt>
<dd>
<pre><code class='coffeescript'>{
Haskell: 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

@ -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'>brittany.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
brittany.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;beautifiers</td>
</tr>
<tr>
<td>
Classes:
</td>
<td>
<a href='../../../class/Brittany.html'>
StylishHaskell
</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'>hindent.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
hindent.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;beautifiers</td>
</tr>
<tr>
<td>
Classes:
</td>
<td>
<a href='../../../class/Hindent.html'>
StylishHaskell
</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

@ -65,6 +65,14 @@
src&#47;beautifiers
</small>
</li>
<li>
<a href='file/src/beautifiers/brittany.coffee.html' target='main'>
brittany.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
@ -88,7 +96,7 @@
</small>
</li>
</ul>
<li>
<a href='file/src/beautifiers/coffee-fmt.coffee.html' target='main'>
coffee-fmt.coffee
@ -160,7 +168,7 @@
</small>
</li>
</ul>
<li>
<span>
fortran-beautifier
@ -176,7 +184,7 @@
</small>
</li>
</ul>
<li>
<a href='file/src/beautifiers/gherkin.coffee.html' target='main'>
gherkin.coffee
@ -193,6 +201,14 @@
src&#47;beautifiers
</small>
</li>
<li>
<a href='file/src/beautifiers/hindent.coffee.html' target='main'>
hindent.coffee
</a>
<small class='namespace'>
src&#47;beautifiers
</small>
</li>
<li>
<a href='file/src/beautifiers/htmlbeautifier.coffee.html' target='main'>
htmlbeautifier.coffee
@ -248,7 +264,7 @@
</small>
</li>
</ul>
<li>
<a href='file/src/beautifiers/marko-beautifier.coffee.html' target='main'>
marko-beautifier.coffee
@ -408,7 +424,7 @@
</small>
</li>
</ul>
<li>
<a href='file/src/beautifiers/vue-beautifier.coffee.html' target='main'>
vue-beautifier.coffee
@ -426,7 +442,7 @@
</small>
</li>
</ul>
<li>
<a href='file/src/beautify.coffee.html' target='main'>
beautify.coffee
@ -946,7 +962,7 @@
</small>
</li>
</ul>
<li>
<span>
views
@ -970,11 +986,11 @@
</small>
</li>
</ul>
</ul>
</ul>
</div>
</body>
</html>
</html>

View File

@ -4315,13 +4315,13 @@ Maximum characters per line (0 disables) (Supported by JS Beautify, Pretty Diff)
#### [Haskell](#haskell)
**Supported Beautifiers**: [`stylish-haskell`](#stylish-haskell)
**Supported Beautifiers**: [`brittany`](#brittany) [`hindent`](#hindent) [`stylish-haskell`](#stylish-haskell)
| Option | stylish-haskell |
| --- | --- |
| `disabled` | :white_check_mark: |
| `default_beautifier` | :white_check_mark: |
| `beautify_on_save` | :white_check_mark: |
| Option | brittany | hindent | stylish-haskell |
| --- | --- | --- | --- |
| `disabled` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| `default_beautifier` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| `beautify_on_save` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
**Description**:
@ -4352,7 +4352,7 @@ Disable Haskell Beautification
**Type**: `string`
**Enum**: `stylish-haskell`
**Enum**: `brittany` `hindent` `stylish-haskell`
**Description**:

View File

@ -1,10 +0,0 @@
{-# LANGUAGE Wat #-}
import Bar
import Foo
import qualified Baz as Bang
data Person = Person {
name :: String,
address :: String
}

View File

@ -0,0 +1,33 @@
{-# LANGUAGE OverloadedStrings #-}
module TypeFun where
import Foo
import Bar
import qualified Baz as Bang
import Data.Typeable
data Person = Person {
name :: String,
address :: String
}
main :: IO ()
main = do
doSomethingOnType 'c'
doSomethingOnType (35 :: Integer)
doSomethingOnType "a string"
doSomethingOnType :: Typeable a => a -> IO ()
doSomethingOnType a = case show (typeOf a) of
"Char" -> print $ performActionOnChar a
"Integer" -> print $ performActionOnInt a
_ -> print "undefined!"
performActionOnChar :: Typeable a => a -> String
performActionOnChar a = case cast a :: Maybe Char of
Just c -> "Concatenating with string: " ++ [c]
Nothing -> "Cast went wrong..."
performActionOnInt :: Typeable a => a -> String
performActionOnInt a = case cast a :: Maybe Integer of
Just i -> "Concatenating with string: " ++ show (i + 10)
Nothing -> "Cast went wrong..."

View File

@ -0,0 +1,38 @@
{-# LANGUAGE OverloadedStrings #-}
module TypeFun where
import Bar
import qualified Baz as Bang
import Data.Typeable
import Foo
data Person = Person
{ name :: String
, address :: String
}
main :: IO ()
main = do
doSomethingOnType 'c'
doSomethingOnType (35 :: Integer)
doSomethingOnType "a string"
doSomethingOnType :: Typeable a => a -> IO ()
doSomethingOnType a =
case show (typeOf a) of
"Char" -> print $ performActionOnChar a
"Integer" -> print $ performActionOnInt a
_ -> print "undefined!"
performActionOnChar :: Typeable a => a -> String
performActionOnChar a =
case cast a :: Maybe Char of
Just c -> "Concatenating with string: " ++ [c]
Nothing -> "Cast went wrong..."
performActionOnInt :: Typeable a => a -> String
performActionOnInt a =
case cast a :: Maybe Integer of
Just i -> "Concatenating with string: " ++ show (i + 10)
Nothing -> "Cast went wrong..."

View File

@ -0,0 +1,36 @@
{-# LANGUAGE OverloadedStrings #-}
module TypeFun where
import Bar
import qualified Baz as Bang
import Data.Typeable
import Foo
data Person = Person {
name :: String,
address :: String
}
main :: IO ()
main = do
doSomethingOnType 'c'
doSomethingOnType (35 :: Integer)
doSomethingOnType "a string"
doSomethingOnType :: Typeable a => a -> IO ()
doSomethingOnType a =
case show (typeOf a) of
"Char" -> print $ performActionOnChar a
"Integer" -> print $ performActionOnInt a
_ -> print "undefined!"
performActionOnChar :: Typeable a => a -> String
performActionOnChar a =
case cast a :: Maybe Char of
Just c -> "Concatenating with string: " ++ [c]
Nothing -> "Cast went wrong..."
performActionOnInt :: Typeable a => a -> String
performActionOnInt a =
case cast a :: Maybe Integer of
Just i -> "Concatenating with string: " ++ show (i + 10)
Nothing -> "Cast went wrong..."

View File

@ -1,10 +1,36 @@
{-# LANGUAGE Wat #-}
{-# LANGUAGE OverloadedStrings #-}
module TypeFun where
import Foo
import Bar
import qualified Baz as Bang
import Data.Typeable
data Person = Person {
name :: String,
address :: String
}
main :: IO ()
main = do
doSomethingOnType 'c'
doSomethingOnType (35 :: Integer)
doSomethingOnType "a string"
doSomethingOnType :: Typeable a => a -> IO ()
doSomethingOnType a =
case show (typeOf a) of
"Char" -> print $ performActionOnChar a
"Integer" -> print $ performActionOnInt a
_ -> print "undefined!"
performActionOnChar :: Typeable a => a -> String
performActionOnChar a =
case cast a :: Maybe Char of
Just c -> "Concatenating with string: " ++ [c]
Nothing -> "Cast went wrong..."
performActionOnInt :: Typeable a => a -> String
performActionOnInt a =
case cast a :: Maybe Integer of
Just i -> "Concatenating with string: " ++ show (i + 10)
Nothing -> "Cast went wrong..."

View File

@ -150,6 +150,11 @@
{
"name": "Steven Zeck",
"url": "https://github.com/szeck87"
},
{
"name": "Christian Kjær Laustsen",
"email": "ckl@codetalk.io",
"url": "https://github.com/Tehnix"
}
],
"engines": {
@ -344,6 +349,8 @@
"gherkin",
"fortran",
"haskell",
"hindent",
"brittany",
"jade",
"jsx",
"latex",

View File

@ -0,0 +1,24 @@
###
Requires https://github.com/lspitzner/brittany
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Brittany extends Beautifier
name: "brittany"
link: "https://github.com/lspitzner/brittany"
isPreInstalled: false
options: {
Haskell: true
}
beautify: (text, language, options) ->
@run("brittany", [
@tempFile("input", text)
], {
help: {
link: "https://github.com/lspitzner/brittany"
}
})

View File

@ -0,0 +1,27 @@
###
Requires https://github.com/commercialhaskell/hindent
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Hindent extends Beautifier
name: "hindent"
link: "https://github.com/commercialhaskell/hindent"
isPreInstalled: false
options: {
Haskell: true
}
beautify: (text, language, options) ->
@run("hindent", [
tempFile = @tempFile("temp", text)
], {
help: {
link: "https://github.com/commercialhaskell/hindent"
}
})
.then(=>
@readFile(tempFile)
)

View File

@ -37,6 +37,7 @@ module.exports = class Beautifiers extends EventEmitter
'uncrustify'
'align-yaml'
'autopep8'
'brittany'
'coffee-formatter'
'coffee-fmt'
'cljfmt'
@ -52,6 +53,7 @@ module.exports = class Beautifiers extends EventEmitter
'goimports'
'latex-beautify'
'fortran-beautifier'
'hindent'
'js-beautify'
'jscs'
'eslint'

View File

@ -17,6 +17,8 @@ module.exports = {
"hs"
]
defaultBeautifier: "stylish-haskell"
options: []
}

View File

@ -2395,6 +2395,8 @@
"description": "Options for language Haskell",
"collapsed": true,
"beautifiers": [
"brittany",
"hindent",
"stylish-haskell"
],
"grammars": [
@ -2415,9 +2417,11 @@
"title": "Default Beautifier",
"order": -2,
"type": "string",
"default": "stylish-haskell",
"default": "brittany",
"description": "Default Beautifier to be used for Haskell",
"enum": [
"brittany",
"hindent",
"stylish-haskell"
]
},