This commit is contained in:
parent
a9d3a0cce6
commit
111e3756b3
|
@ -641,6 +641,7 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify)
|
|||
| `default_beautifier` | :white_check_mark: |
|
||||
| `beautify_on_save` | :white_check_mark: |
|
||||
| `indent_size` | :white_check_mark: |
|
||||
| `indent_with_tabs` | :white_check_mark: |
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -727,6 +728,30 @@ Indentation size/length (Supported by beautysh)
|
|||
}
|
||||
```
|
||||
|
||||
##### [Indent with tabs](#indent-with-tabs)
|
||||
|
||||
**Namespace**: `bash`
|
||||
|
||||
**Key**: `indent_with_tabs`
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Supported Beautifiers**: [`beautysh`](#beautysh)
|
||||
|
||||
**Description**:
|
||||
|
||||
Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by beautysh)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
```json
|
||||
{
|
||||
"bash": {
|
||||
"indent_with_tabs": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### [C](#c)
|
||||
|
||||
**Supported Beautifiers**: [`Uncrustify`](#uncrustify) [`clang-format`](#clang-format)
|
||||
|
@ -19049,6 +19074,30 @@ Indentation size/length (Supported by beautysh)
|
|||
}
|
||||
```
|
||||
|
||||
##### [Indent with tabs](#indent-with-tabs)
|
||||
|
||||
**Namespace**: `bash`
|
||||
|
||||
**Key**: `indent_with_tabs`
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Supported Beautifiers**: [`beautysh`](#beautysh)
|
||||
|
||||
**Description**:
|
||||
|
||||
Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by beautysh)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
```json
|
||||
{
|
||||
"bash": {
|
||||
"indent_with_tabs": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### clang-format
|
||||
|
||||
|
|
|
@ -24,13 +24,13 @@ module.exports = class BashBeautify extends Beautifier
|
|||
options: {
|
||||
Bash:
|
||||
indent_size: true
|
||||
use_tabs: true
|
||||
indent_with_tabs: true
|
||||
}
|
||||
|
||||
beautify: (text, language, options) ->
|
||||
beautysh = @exe("beautysh")
|
||||
file = @tempFile("input", text)
|
||||
tabs = options.use_tabs
|
||||
tabs = options.indent_with_tabs
|
||||
if tabs is true
|
||||
beautysh.run([ '-t', '-f', file ])
|
||||
.then(=> @readFile file)
|
||||
|
|
|
@ -27,9 +27,9 @@ module.exports = {
|
|||
default: null
|
||||
minimum: 0
|
||||
description: "Indentation size/length"
|
||||
use_tabs:
|
||||
indent_with_tabs:
|
||||
type: 'boolean'
|
||||
default: null
|
||||
description: "Use tabs for indentation"
|
||||
description: "Indentation uses tabs, overrides `Indent Size` and `Indent Char`"
|
||||
|
||||
}
|
||||
|
|
|
@ -146,15 +146,15 @@
|
|||
"namespace": "bash"
|
||||
}
|
||||
},
|
||||
"use_tabs": {
|
||||
"indent_with_tabs": {
|
||||
"type": "boolean",
|
||||
"default": null,
|
||||
"description": "Use tabs instead of spaces for indentation, overrides `Indent Size` (Supported by beautysh)",
|
||||
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by beautysh)",
|
||||
"title": "Indent with tabs",
|
||||
"beautifiers": [
|
||||
"beautysh"
|
||||
],
|
||||
"key": "use_tabs",
|
||||
"key": "indent_with_tabs",
|
||||
"language": {
|
||||
"name": "Bash",
|
||||
"namespace": "bash"
|
||||
|
|
Loading…
Reference in New Issue