Support stylish-haskell
This commit is contained in:
parent
ff7a0a4efb
commit
c4b795bb0b
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
])
|
|
@ -0,0 +1,22 @@
|
|||
module.exports = {
|
||||
|
||||
name: "Haskell"
|
||||
namespace: "haskell"
|
||||
|
||||
###
|
||||
Supported Grammars
|
||||
###
|
||||
grammars: [
|
||||
"Haskell"
|
||||
]
|
||||
|
||||
###
|
||||
Supported extensions
|
||||
###
|
||||
extensions: [
|
||||
"hs"
|
||||
]
|
||||
|
||||
options: []
|
||||
|
||||
}
|
|
@ -26,6 +26,7 @@ module.exports = class Languages
|
|||
"go"
|
||||
"fortran"
|
||||
"handlebars"
|
||||
"haskell"
|
||||
"html"
|
||||
"java"
|
||||
"javascript"
|
||||
|
|
Loading…
Reference in New Issue