Support stylish-haskell

This commit is contained in:
Bob Long 2015-10-29 18:46:22 +00:00
parent ff7a0a4efb
commit c4b795bb0b
5 changed files with 45 additions and 1 deletions

View File

@ -68,6 +68,8 @@ Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify`
- [x] [Vala](https://github.com/Glavin001/atom-beautify/issues/57)
- Requires [Uncrustify](http://sourceforge.net/projects/uncrustify/)
- [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)
## Usage

View File

@ -53,6 +53,7 @@ module.exports = class Beautifiers extends EventEmitter
'ruby-beautify'
'rustfmt'
'sqlformat'
'stylish-haskell'
'tidy-markdown'
'typescript-formatter'
'yapf'
@ -121,7 +122,7 @@ module.exports = class Beautifiers extends EventEmitter
# Remember Option's Key
op.key = field
# Remember Option's Language
op.language = lang

View File

@ -0,0 +1,18 @@
###
Requires https://github.com/jaspervdj/stylish-haskell
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class StylishHaskell extends Beautifier
name: "stylish-haskell"
options: {
Haskell: true
}
beautify: (text, language, options) ->
@run("stylish-haskell", [
@tempFile("input", text)
])

View File

@ -0,0 +1,22 @@
module.exports = {
name: "Haskell"
namespace: "haskell"
###
Supported Grammars
###
grammars: [
"Haskell"
]
###
Supported extensions
###
extensions: [
"hs"
]
options: []
}

View File

@ -26,6 +26,7 @@ module.exports = class Languages
"go"
"fortran"
"handlebars"
"haskell"
"html"
"java"
"javascript"