Add support for Elm
This commit is contained in:
parent
bb91eab955
commit
31695b33c9
|
@ -59,3 +59,6 @@ before_install:
|
|||
- brew install haskell-stack
|
||||
- stack setup
|
||||
- stack install stylish-haskell
|
||||
# Elm
|
||||
- curl -L -o /tmp/elm-format.tgz
|
||||
- tar xvzf -C /usr/local/bin /tmp/elm-format.tgz
|
||||
|
|
|
@ -70,6 +70,8 @@ Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify`
|
|||
- [x] [TypeScript](https://github.com/Glavin001/atom-beautify/issues/49)
|
||||
- [x] [Haskell](https://github.com/Glavin001/atom-beautify/issues/628)
|
||||
- Requires [stylish-haskell](https://github.com/jaspervdj/stylish-haskell)
|
||||
- [x] [Elm]()
|
||||
- Requires [Elm-Format](https://github.com/avh4/elm-format)
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
module Main (..) where
|
||||
|
||||
|
||||
addThings x y =
|
||||
x + y
|
||||
|
||||
|
||||
main =
|
||||
addThings 4 5
|
|
@ -0,0 +1,3 @@
|
|||
addThings x y = x + y
|
||||
|
||||
main = addThings 4 5
|
|
@ -0,0 +1,18 @@
|
|||
###
|
||||
Requires https://github.com/avh4/elm-format
|
||||
###
|
||||
|
||||
"use strict"
|
||||
Beautifier = require('./beautifier')
|
||||
|
||||
module.exports = class ElmFormat extends Beautifier
|
||||
name: "elm-format"
|
||||
|
||||
options: {
|
||||
Elm: true
|
||||
}
|
||||
|
||||
beautify: (text, language, options) ->
|
||||
@run("elm-format", [
|
||||
@tempFile("input", text)
|
||||
])
|
|
@ -38,6 +38,7 @@ module.exports = class Beautifiers extends EventEmitter
|
|||
'coffee-formatter'
|
||||
'coffee-fmt'
|
||||
'clang-format'
|
||||
'elm-format'
|
||||
'htmlbeautifier'
|
||||
'csscomb'
|
||||
'gherkin'
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
module.exports = {
|
||||
|
||||
name: "Elm"
|
||||
namespace: "elm"
|
||||
|
||||
###
|
||||
Supported Grammars
|
||||
###
|
||||
grammars: [
|
||||
"Elm"
|
||||
]
|
||||
|
||||
###
|
||||
Supported extensions
|
||||
###
|
||||
extensions: [
|
||||
"elm"
|
||||
]
|
||||
|
||||
options: []
|
||||
|
||||
}
|
|
@ -21,6 +21,7 @@ module.exports = class Languages
|
|||
"csv"
|
||||
"d"
|
||||
"ejs"
|
||||
"elm"
|
||||
"erb"
|
||||
"gherkin"
|
||||
"go"
|
||||
|
|
Loading…
Reference in New Issue