Update TSX options

This commit is contained in:
Steven Zeck 2018-02-20 15:28:42 -06:00
parent e97cdea57e
commit b4c75b4837
4 changed files with 86 additions and 2 deletions

View File

@ -12292,6 +12292,8 @@ Maximum amount of characters per line (0 = disable) (Supported by Pretty Diff)
| `disabled` | :white_check_mark: |
| `default_beautifier` | :white_check_mark: |
| `beautify_on_save` | :white_check_mark: |
| `indent_size` | :white_check_mark: |
| `indent_with_tabs` | :white_check_mark: |
**Description**:
@ -12352,6 +12354,56 @@ Automatically beautify TSX 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.
##### [Indent size](#indent-size)
**Namespace**: `js`
**Key**: `indent_size`
**Default**: `4`
**Type**: `integer`
**Supported Beautifiers**: [`TypeScript Formatter`](#typescript-formatter)
**Description**:
Indentation size/length (Supported by TypeScript Formatter)
**Example `.jsbeautifyrc` Configuration**
```json
{
"js": {
"indent_size": 4
}
}
```
##### [Indent with tabs](#indent-with-tabs)
**Namespace**: `js`
**Key**: `indent_with_tabs`
**Type**: `boolean`
**Supported Beautifiers**: [`TypeScript Formatter`](#typescript-formatter)
**Description**:
Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by TypeScript Formatter)
**Example `.jsbeautifyrc` Configuration**
```json
{
"js": {
"indent_with_tabs": false
}
}
```
#### [Twig](#twig)
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)

View File

@ -9,7 +9,10 @@ module.exports = class TypeScriptFormatter extends Beautifier
indent_with_tabs: true
tab_width: true
indent_size: true
TSX: true
TSX:
indent_with_tabs: true
tab_width: true
indent_size: true
}
beautify: (text, language, options) ->

View File

@ -2,7 +2,7 @@ module.exports = {
name: "TSX"
namespace: "tsx"
fallback: ['ts']
fallback: ['js']
###
Supported Grammars

View File

@ -7199,6 +7199,35 @@
"tsx"
],
"properties": {
"indent_size": {
"type": "integer",
"default": null,
"minimum": 0,
"description": "Indentation size/length (Supported by TypeScript Formatter)",
"title": "Indent size",
"beautifiers": [
"TypeScript Formatter"
],
"key": "indent_size",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"indent_with_tabs": {
"type": "boolean",
"default": null,
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by TypeScript Formatter)",
"title": "Indent with tabs",
"beautifiers": [
"TypeScript Formatter"
],
"key": "indent_with_tabs",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"disabled": {
"title": "Disable Beautifying Language",
"order": -3,