Switch clang-format to using Executables, update docs
This commit is contained in:
parent
02d4c8f404
commit
738847c156
|
@ -164,6 +164,40 @@ Options for autopep8 executable.
|
|||
2. Go into *Packages* and search for "*Atom Beautify*" package.
|
||||
3. Find the option "*autopep8*" and change it to your desired configuration.
|
||||
|
||||
##### [beautysh](#beautysh)
|
||||
|
||||
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||
|
||||
**Type**: `object`
|
||||
|
||||
**Description**:
|
||||
|
||||
Options for beautysh 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 "*beautysh*" and change it to your desired configuration.
|
||||
|
||||
##### [ClangFormat](#clangformat)
|
||||
|
||||
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||
|
||||
**Type**: `object`
|
||||
|
||||
**Description**:
|
||||
|
||||
Options for ClangFormat 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 "*ClangFormat*" and change it to your desired configuration.
|
||||
|
||||
##### [Emacs](#emacs)
|
||||
|
||||
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||
|
|
|
@ -11,7 +11,17 @@ module.exports = class ClangFormat extends Beautifier
|
|||
|
||||
name: "clang-format"
|
||||
link: "https://clang.llvm.org/docs/ClangFormat.html"
|
||||
isPreInstalled: false
|
||||
executables: [
|
||||
{
|
||||
name: "ClangFormat"
|
||||
cmd: "clang-format"
|
||||
homepage: "https://clang.llvm.org/docs/ClangFormat.html"
|
||||
installation: "https://clang.llvm.org/docs/ClangFormat.html"
|
||||
version: {
|
||||
parse: (text) -> text.match(/version (\d+\.\d+\.\d+)/)[1]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
options: {
|
||||
"C++": false
|
||||
|
@ -64,12 +74,10 @@ module.exports = class ClangFormat extends Beautifier
|
|||
)
|
||||
.then((dumpFile) =>
|
||||
# console.log("clang-format", dumpFile)
|
||||
return @run("clang-format", [
|
||||
return @exe("clang-format").run([
|
||||
@dumpToFile(dumpFile, text)
|
||||
["--style=file"]
|
||||
], help: {
|
||||
link: "https://clang.llvm.org/docs/ClangFormat.html"
|
||||
}).finally( ->
|
||||
]).finally( ->
|
||||
fs.unlink(dumpFile)
|
||||
)
|
||||
)
|
||||
|
|
|
@ -9178,6 +9178,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"clang-format": {
|
||||
"key": "clang-format",
|
||||
"title": "ClangFormat",
|
||||
"type": "object",
|
||||
"collapsed": true,
|
||||
"description": "Options for ClangFormat executable.",
|
||||
"properties": {
|
||||
"path": {
|
||||
"key": "path",
|
||||
"title": "Executable Path",
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"description": "Absolute path to the \"clang-format\" executable."
|
||||
}
|
||||
}
|
||||
},
|
||||
"emacs": {
|
||||
"key": "emacs",
|
||||
"title": "Emacs",
|
||||
|
@ -9257,6 +9273,22 @@
|
|||
"description": "Absolute path to the \"Rscript\" executable."
|
||||
}
|
||||
}
|
||||
},
|
||||
"beautysh": {
|
||||
"key": "beautysh",
|
||||
"title": "beautysh",
|
||||
"type": "object",
|
||||
"collapsed": true,
|
||||
"description": "Options for beautysh executable.",
|
||||
"properties": {
|
||||
"path": {
|
||||
"key": "path",
|
||||
"title": "Executable Path",
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"description": "Absolute path to the \"beautysh\" executable."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue