Switch Dfmt beautifier to using Executables

This commit is contained in:
Glavin Wiechert 2017-06-02 18:22:32 -03:00
parent 349edae0fd
commit 3e78dc8701
3 changed files with 75 additions and 2 deletions

View File

@ -198,6 +198,40 @@ Options for ClangFormat executable.
2. Go into *Packages* and search for "*Atom Beautify*" package.
3. Find the option "*ClangFormat*" and change it to your desired configuration.
##### [Crystal](#crystal)
**Important**: This option is only configurable from within Atom Beautify's setting panel.
**Type**: `object`
**Description**:
Options for Crystal executable.
**How to Configure**
1. You can open the [Settings View](https://github.com/atom/settings-view) by navigating to
*Edit > Preferences (Linux)*, *Atom > Preferences (OS X)*, or *File > Preferences (Windows)*.
2. Go into *Packages* and search for "*Atom Beautify*" package.
3. Find the option "*Crystal*" and change it to your desired configuration.
##### [Dfmt](#dfmt)
**Important**: This option is only configurable from within Atom Beautify's setting panel.
**Type**: `object`
**Description**:
Options for Dfmt executable.
**How to Configure**
1. You can open the [Settings View](https://github.com/atom/settings-view) by navigating to
*Edit > Preferences (Linux)*, *Atom > Preferences (OS X)*, or *File > Preferences (Windows)*.
2. Go into *Packages* and search for "*Atom Beautify*" package.
3. Find the option "*Dfmt*" and change it to your desired configuration.
##### [Emacs](#emacs)
**Important**: This option is only configurable from within Atom Beautify's setting panel.

View File

@ -7,13 +7,20 @@ Beautifier = require('./beautifier')
module.exports = class Dfmt extends Beautifier
name: "dfmt"
link: "https://github.com/Hackerpilot/dfmt"
isPreInstalled: false
executables: [
{
name: "Dfmt"
cmd: "dfmt"
homepage: "https://github.com/Hackerpilot/dfmt"
installation: "https://github.com/dlang-community/dfmt#building"
}
]
options: {
D: false
}
beautify: (text, language, options) ->
@run("dfmt", [
@exe("dfmt").run([
@tempFile("input", text)
])

View File

@ -9194,6 +9194,38 @@
}
}
},
"crystal": {
"key": "crystal",
"title": "Crystal",
"type": "object",
"collapsed": true,
"description": "Options for Crystal executable.",
"properties": {
"path": {
"key": "path",
"title": "Executable Path",
"type": "string",
"default": "",
"description": "Absolute path to the \"crystal\" executable."
}
}
},
"dfmt": {
"key": "dfmt",
"title": "Dfmt",
"type": "object",
"collapsed": true,
"description": "Options for Dfmt executable.",
"properties": {
"path": {
"key": "path",
"title": "Executable Path",
"type": "string",
"default": "",
"description": "Absolute path to the \"dfmt\" executable."
}
}
},
"emacs": {
"key": "emacs",
"title": "Emacs",