Adding Clojure executable options
This commit is contained in:
parent
a3fc41a9db
commit
5d81ad073a
|
@ -1642,6 +1642,7 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff)
|
|||
| `disabled` | :white_check_mark: |
|
||||
| `default_beautifier` | :white_check_mark: |
|
||||
| `beautify_on_save` | :white_check_mark: |
|
||||
| `executable_path` | :white_check_mark: |
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -1702,6 +1703,32 @@ Automatically beautify Clojure files on save
|
|||
2. Go into *Packages* and search for "*Atom Beautify*" package.
|
||||
3. Find the option "*Beautify On Save*" and change it to your desired configuration.
|
||||
|
||||
##### [Executable path](#executable-path)
|
||||
|
||||
**Namespace**: `clj`
|
||||
|
||||
**Key**: `executable_path`
|
||||
|
||||
**Default**: `C:\Users\david\Documents\GitHub\node_modules\.bin\cljfmt`
|
||||
|
||||
**Type**: `string`
|
||||
|
||||
**Supported Beautifiers**: [`cljfmt`](#cljfmt)
|
||||
|
||||
**Description**:
|
||||
|
||||
The path to the cljfmt executable to use (Supported by cljfmt)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
```json
|
||||
{
|
||||
"clj": {
|
||||
"executable_path": "C:\\Users\\david\\Documents\\GitHub\\node_modules\\.bin\\cljfmt"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### [CoffeeScript](#coffeescript)
|
||||
|
||||
**Supported Beautifiers**: [`Coffee Formatter`](#coffee-formatter) [`coffee-fmt`](#coffee-fmt)
|
||||
|
@ -20376,6 +20403,35 @@ Path to clang-format config file. i.e. clang-format.cfg (Supported by clang-form
|
|||
```
|
||||
|
||||
|
||||
### cljfmt
|
||||
|
||||
##### [Executable path](#executable-path)
|
||||
|
||||
**Namespace**: `clj`
|
||||
|
||||
**Key**: `executable_path`
|
||||
|
||||
**Default**: `C:\Users\david\Documents\GitHub\node_modules\.bin\cljfmt`
|
||||
|
||||
**Type**: `string`
|
||||
|
||||
**Supported Beautifiers**: [`cljfmt`](#cljfmt)
|
||||
|
||||
**Description**:
|
||||
|
||||
The path to the cljfmt executable to use (Supported by cljfmt)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
```json
|
||||
{
|
||||
"clj": {
|
||||
"executable_path": "C:\\Users\\david\\Documents\\GitHub\\node_modules\\.bin\\cljfmt"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### coffee-fmt
|
||||
|
||||
##### [Indent size](#indent-size)
|
||||
|
|
|
@ -8,12 +8,13 @@ module.exports = class Cljfmt extends Beautifier
|
|||
link: "https://github.com/snoe/node-cljfmt"
|
||||
|
||||
options: {
|
||||
Clojure: false
|
||||
Clojure:
|
||||
executable_path: true
|
||||
}
|
||||
|
||||
beautify: (text, language, options) ->
|
||||
formatPath = path.resolve(__dirname, "fmt.edn")
|
||||
cljfmt = path.resolve(__dirname, "..", "..", "..", "node_modules/.bin/cljfmt")
|
||||
cljfmt = options.executable_path
|
||||
@tempFile("input", text).then((filePath) =>
|
||||
@run(cljfmt, [
|
||||
filePath,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
path = require('path')
|
||||
module.exports = {
|
||||
|
||||
name: "Clojure"
|
||||
|
@ -18,4 +19,11 @@ module.exports = {
|
|||
]
|
||||
|
||||
defaultBeautifier: "cljfmt"
|
||||
|
||||
options: {
|
||||
executable_path:
|
||||
type: 'string'
|
||||
default: path.resolve(__dirname, "..", "..", "..", "node_modules/.bin/cljfmt")
|
||||
description: "The path to the cljfmt executable to use"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -669,6 +669,20 @@
|
|||
"edn"
|
||||
],
|
||||
"properties": {
|
||||
"executable_path": {
|
||||
"type": "string",
|
||||
"default": "C:\\Users\\david\\Documents\\GitHub\\node_modules\\.bin\\cljfmt",
|
||||
"description": "The path to the cljfmt executable to use (Supported by cljfmt)",
|
||||
"title": "Executable path",
|
||||
"beautifiers": [
|
||||
"cljfmt"
|
||||
],
|
||||
"key": "executable_path",
|
||||
"language": {
|
||||
"name": "Clojure",
|
||||
"namespace": "clj"
|
||||
}
|
||||
},
|
||||
"disabled": {
|
||||
"title": "Disable Beautifying Language",
|
||||
"order": -3,
|
||||
|
|
Loading…
Reference in New Issue