Run docs and add examples
This commit is contained in:
parent
0044fab625
commit
7121eef0be
|
@ -73,6 +73,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! |
|
||||
|
@ -89,6 +90,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! |
|
||||
|
@ -146,7 +148,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)** |
|
||||
|
|
|
@ -4678,13 +4678,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**:
|
||||
|
||||
|
@ -4711,11 +4711,11 @@ Disable Haskell Beautification
|
|||
|
||||
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||
|
||||
**Default**: `stylish-haskell`
|
||||
**Default**: `brittany`
|
||||
|
||||
**Type**: `string`
|
||||
|
||||
**Enum**: `stylish-haskell`
|
||||
**Enum**: `brittany` `hindent` `stylish-haskell`
|
||||
|
||||
**Description**:
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{-# LANGUAGE Wat #-}
|
||||
import Bar
|
||||
import Foo
|
||||
|
||||
import qualified Baz as Bang
|
||||
|
||||
data Person = Person {
|
||||
name :: String,
|
||||
address :: String
|
||||
}
|
|
@ -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..."
|
|
@ -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..."
|
|
@ -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..."
|
|
@ -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..."
|
||||
|
|
|
@ -2632,9 +2632,9 @@
|
|||
"description": "Options for language Haskell",
|
||||
"collapsed": true,
|
||||
"beautifiers": [
|
||||
"stylish-haskell",
|
||||
"brittany",
|
||||
"hindent",
|
||||
"brittany"
|
||||
"stylish-haskell"
|
||||
],
|
||||
"grammars": [
|
||||
"Haskell"
|
||||
|
@ -2654,12 +2654,12 @@
|
|||
"title": "Default Beautifier",
|
||||
"order": -2,
|
||||
"type": "string",
|
||||
"default": "stylish-haskell",
|
||||
"default": "brittany",
|
||||
"description": "Default Beautifier to be used for Haskell",
|
||||
"enum": [
|
||||
"stylish-haskell",
|
||||
"brittany",
|
||||
"hindent",
|
||||
"brittany"
|
||||
"stylish-haskell"
|
||||
]
|
||||
},
|
||||
"beautify_on_save": {
|
||||
|
@ -9381,4 +9381,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue