Merge branch 'master' of git://github.com/markbaas/atom-beautify into markbaas-master
This commit is contained in:
commit
dee67da140
|
@ -72,6 +72,8 @@ Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify`
|
||||||
- Requires [stylish-haskell](https://github.com/jaspervdj/stylish-haskell)
|
- Requires [stylish-haskell](https://github.com/jaspervdj/stylish-haskell)
|
||||||
- [x] [Elm](https://github.com/Glavin001/atom-beautify/pull/700)
|
- [x] [Elm](https://github.com/Glavin001/atom-beautify/pull/700)
|
||||||
- Requires [Elm-Format](https://github.com/avh4/elm-format)
|
- Requires [Elm-Format](https://github.com/avh4/elm-format)
|
||||||
|
- [x] [Erlang](https://github.com/Glavin001/atom-beautify/pull/683)
|
||||||
|
- Requires erlang syntax_tools to be installed
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
###
|
||||||
|
Requires https://github.com/hhatto/autopep8
|
||||||
|
###
|
||||||
|
|
||||||
|
"use strict"
|
||||||
|
Beautifier = require('./beautifier')
|
||||||
|
|
||||||
|
module.exports = class ErlTidy extends Beautifier
|
||||||
|
|
||||||
|
name: "erl_tidy"
|
||||||
|
|
||||||
|
options: {
|
||||||
|
Erlang: true
|
||||||
|
}
|
||||||
|
|
||||||
|
beautify: (text, language, options) ->
|
||||||
|
tempFile = undefined
|
||||||
|
@tempFile("input", text).then((path) =>
|
||||||
|
tempFile = path
|
||||||
|
@run("erl", [
|
||||||
|
["-eval", 'erl_tidy:file("' + tempFile + '")']
|
||||||
|
["-noshell", "-s", "init", "stop"]
|
||||||
|
])
|
||||||
|
).then(=>
|
||||||
|
@readFile(tempFile)
|
||||||
|
)
|
|
@ -58,6 +58,7 @@ module.exports = class Beautifiers extends EventEmitter
|
||||||
'tidy-markdown'
|
'tidy-markdown'
|
||||||
'typescript-formatter'
|
'typescript-formatter'
|
||||||
'yapf'
|
'yapf'
|
||||||
|
'erl_tidy'
|
||||||
]
|
]
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
module.exports = {
|
||||||
|
|
||||||
|
name: "Erlang"
|
||||||
|
namespace: "erlang"
|
||||||
|
fallback: []
|
||||||
|
|
||||||
|
###
|
||||||
|
Supported Grammars
|
||||||
|
###
|
||||||
|
grammars: [
|
||||||
|
"Erlang"
|
||||||
|
]
|
||||||
|
|
||||||
|
###
|
||||||
|
Supported extensions
|
||||||
|
###
|
||||||
|
extensions: ['erl']
|
||||||
|
|
||||||
|
options: []
|
||||||
|
|
||||||
|
}
|
|
@ -23,6 +23,7 @@ module.exports = class Languages
|
||||||
"ejs"
|
"ejs"
|
||||||
"elm"
|
"elm"
|
||||||
"erb"
|
"erb"
|
||||||
|
"erlang"
|
||||||
"gherkin"
|
"gherkin"
|
||||||
"go"
|
"go"
|
||||||
"fortran"
|
"fortran"
|
||||||
|
|
Loading…
Reference in New Issue