Merge branch 'Lawstorant-master'
This commit is contained in:
commit
175137fd9a
|
@ -1,4 +1,5 @@
|
|||
# Next
|
||||
- Add the option to indent Bash with tabs [#1951](https://github.com/Glavin001/atom-beautify/issues/1951)
|
||||
- See [#1980](https://github.com/Glavin001/atom-beautify/pull/1980). Add VHDL beautifier and language support.
|
||||
- Implement Verilog/SystemVerilog beautification via emacs verilog-mode
|
||||
- Add support for MagicPython grammar [#1851](https://github.com/Glavin001/atom-beautify/issues/1851)
|
||||
|
|
|
@ -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,10 +24,16 @@ module.exports = class BashBeautify extends Beautifier
|
|||
options: {
|
||||
Bash:
|
||||
indent_size: true
|
||||
indent_with_tabs: true
|
||||
}
|
||||
|
||||
beautify: (text, language, options) ->
|
||||
beautysh = @exe("beautysh")
|
||||
file = @tempFile("input", text)
|
||||
beautysh.run([ '-i', options.indent_size, '-f', file ])
|
||||
.then(=> @readFile file)
|
||||
tabs = options.indent_with_tabs
|
||||
if tabs is true
|
||||
beautysh.run([ '-t', '-f', file ])
|
||||
.then(=> @readFile file)
|
||||
else
|
||||
beautysh.run([ '-i', options.indent_size, '-f', file ])
|
||||
.then(=> @readFile file)
|
||||
|
|
|
@ -27,5 +27,9 @@ module.exports = {
|
|||
default: null
|
||||
minimum: 0
|
||||
description: "Indentation size/length"
|
||||
indent_with_tabs:
|
||||
type: 'boolean'
|
||||
default: null
|
||||
description: "Indentation uses tabs, overrides `Indent Size` and `Indent Char`"
|
||||
|
||||
}
|
||||
|
|
|
@ -146,6 +146,20 @@
|
|||
"namespace": "bash"
|
||||
}
|
||||
},
|
||||
"indent_with_tabs": {
|
||||
"type": "boolean",
|
||||
"default": null,
|
||||
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by beautysh)",
|
||||
"title": "Indent with tabs",
|
||||
"beautifiers": [
|
||||
"beautysh"
|
||||
],
|
||||
"key": "indent_with_tabs",
|
||||
"language": {
|
||||
"name": "Bash",
|
||||
"namespace": "bash"
|
||||
}
|
||||
},
|
||||
"disabled": {
|
||||
"title": "Disable Beautifying Language",
|
||||
"order": -3,
|
||||
|
|
Loading…
Reference in New Issue