Clean up some PR code
This commit is contained in:
parent
e3256d13bc
commit
0f82daa55c
|
@ -59,7 +59,7 @@ See [all supported options in the documentation at `docs/options.md`](https://g
|
||||||
| Arduino | `Arduino` |`.ino`, `.pde` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
|
| Arduino | `Arduino` |`.ino`, `.pde` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
|
||||||
| C | `C`, `opencl` |`.h`, `.c`, `.cl` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) |
|
| C | `C`, `opencl` |`.h`, `.c`, `.cl` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) |
|
||||||
| Coldfusion | `html` |`.cfm`, `.cfml`, `.cfc` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
|
| Coldfusion | `html` |`.cfm`, `.cfml`, `.cfc` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
|
||||||
| Clojure | `Clojure` |`.clj`, `.cljs`, `.edn` | [`Clojure Beautifier`](https://github.com/snoe/node-cljfmt) |
|
| Clojure | `Clojure` |`.clj`, `.cljs`, `.edn` | [`cljfmt`](https://github.com/snoe/node-cljfmt) (Default) |
|
||||||
| CoffeeScript | `CoffeeScript` |`.coffee` | [`Coffee Formatter`](https://github.com/Glavin001/Coffee-Formatter), [`coffee-fmt`](https://github.com/sterpe/coffee-fmt) (Default) |
|
| CoffeeScript | `CoffeeScript` |`.coffee` | [`Coffee Formatter`](https://github.com/Glavin001/Coffee-Formatter), [`coffee-fmt`](https://github.com/sterpe/coffee-fmt) (Default) |
|
||||||
| C++ | `C++` |`.h`, `.hh`, `.cc`, `.cpp`, `.cxx`, `.C`, `.c++`, `.hpp`, `.hxx`, `.h++` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) |
|
| C++ | `C++` |`.h`, `.hh`, `.cc`, `.cpp`, `.cxx`, `.C`, `.c++`, `.hpp`, `.hxx`, `.h++` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) |
|
||||||
| Crystal | `Crystal` |`.cr` | [`Crystal`](http://crystal-lang.org) (Default) |
|
| Crystal | `Crystal` |`.cr` | [`Crystal`](http://crystal-lang.org) (Default) |
|
||||||
|
@ -109,6 +109,7 @@ See [all supported options in the documentation at `docs/options.md`](https://g
|
||||||
| TSS | `TSS` |`.tss` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
|
| TSS | `TSS` |`.tss` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
|
||||||
| Twig | `HTML (Twig)` |`.twig` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
|
| Twig | `HTML (Twig)` |`.twig` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
|
||||||
| TypeScript | `TypeScript` |`.ts` | [`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter) (Default) |
|
| TypeScript | `TypeScript` |`.ts` | [`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter) (Default) |
|
||||||
|
| UX Markup | `UX` |`.ux` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
|
||||||
| Vala | `Vala` |`.vala`, `.vapi` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
|
| Vala | `Vala` |`.vala`, `.vapi` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
|
||||||
| Visualforce | `Visualforce` |`.page` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
|
| Visualforce | `Visualforce` |`.page` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
|
||||||
| Vue | `Vue Component` |`.vue` | `Vue Beautifier` (Default) |
|
| Vue | `Vue Component` |`.vue` | `Vue Beautifier` (Default) |
|
||||||
|
|
183
docs/options.md
183
docs/options.md
|
@ -592,9 +592,9 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff)
|
||||||
|
|
||||||
#### [Clojure](#clojure)
|
#### [Clojure](#clojure)
|
||||||
|
|
||||||
**Supported Beautifiers**: [`Clojure Beautifier`](#clojure-beautifier)
|
**Supported Beautifiers**: [`cljfmt`](#cljfmt)
|
||||||
|
|
||||||
| Option | Clojure Beautifier |
|
| Option | cljfmt |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `disabled` | :white_check_mark: |
|
| `disabled` | :white_check_mark: |
|
||||||
| `default_beautifier` | :white_check_mark: |
|
| `default_beautifier` | :white_check_mark: |
|
||||||
|
@ -629,7 +629,7 @@ Disable Clojure Beautification
|
||||||
|
|
||||||
**Type**: `string`
|
**Type**: `string`
|
||||||
|
|
||||||
**Enum**: `Clojure Beautifier`
|
**Enum**: `cljfmt`
|
||||||
|
|
||||||
**Description**:
|
**Description**:
|
||||||
|
|
||||||
|
@ -11310,6 +11310,183 @@ Wrap lines at next opportunity after N characters (Supported by TypeScript Forma
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### [UX Markup](#ux-markup)
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||||
|
|
||||||
|
| Option | Pretty Diff |
|
||||||
|
| --- | --- |
|
||||||
|
| `disabled` | :white_check_mark: |
|
||||||
|
| `default_beautifier` | :white_check_mark: |
|
||||||
|
| `beautify_on_save` | :white_check_mark: |
|
||||||
|
| `indent_char` | :white_check_mark: |
|
||||||
|
| `indent_size` | :white_check_mark: |
|
||||||
|
| `preserve_newlines` | :white_check_mark: |
|
||||||
|
| `wrap_line_length` | :white_check_mark: |
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Options for language UX Markup
|
||||||
|
|
||||||
|
##### [Disable Beautifying Language](#disable-beautifying-language)
|
||||||
|
|
||||||
|
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Disable UX Markup Beautification
|
||||||
|
|
||||||
|
**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 "*Disable Beautifying Language*" and change it to your desired configuration.
|
||||||
|
|
||||||
|
##### [Default Beautifier](#default-beautifier)
|
||||||
|
|
||||||
|
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||||
|
|
||||||
|
**Default**: `Pretty Diff`
|
||||||
|
|
||||||
|
**Type**: `string`
|
||||||
|
|
||||||
|
**Enum**: `Pretty Diff`
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Default Beautifier to be used for UX Markup
|
||||||
|
|
||||||
|
**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 "*Default Beautifier*" and change it to your desired configuration.
|
||||||
|
|
||||||
|
##### [Beautify On Save](#beautify-on-save)
|
||||||
|
|
||||||
|
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Automatically beautify UX Markup files on save
|
||||||
|
|
||||||
|
**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 "*Beautify On Save*" and change it to your desired configuration.
|
||||||
|
|
||||||
|
##### [Indent char](#indent-char)
|
||||||
|
|
||||||
|
**Namespace**: `html`
|
||||||
|
|
||||||
|
**Key**: `indent_char`
|
||||||
|
|
||||||
|
**Default**: ` `
|
||||||
|
|
||||||
|
**Type**: `string`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Indentation character (Supported by Pretty Diff)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"html": {
|
||||||
|
"indent_char": " "
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
##### [Indent size](#indent-size)
|
||||||
|
|
||||||
|
**Namespace**: `html`
|
||||||
|
|
||||||
|
**Key**: `indent_size`
|
||||||
|
|
||||||
|
**Default**: `4`
|
||||||
|
|
||||||
|
**Type**: `integer`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Indentation size/length (Supported by Pretty Diff)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"html": {
|
||||||
|
"indent_size": 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
##### [Preserve newlines](#preserve-newlines)
|
||||||
|
|
||||||
|
**Namespace**: `html`
|
||||||
|
|
||||||
|
**Key**: `preserve_newlines`
|
||||||
|
|
||||||
|
**Default**: `true`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Preserve line-breaks (Supported by Pretty Diff)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"html": {
|
||||||
|
"preserve_newlines": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
##### [Wrap line length](#wrap-line-length)
|
||||||
|
|
||||||
|
**Namespace**: `html`
|
||||||
|
|
||||||
|
**Key**: `wrap_line_length`
|
||||||
|
|
||||||
|
**Default**: `250`
|
||||||
|
|
||||||
|
**Type**: `integer`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Maximum characters per line (0 disables) (Supported by Pretty Diff)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"html": {
|
||||||
|
"wrap_line_length": 250
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
#### [Vala](#vala)
|
#### [Vala](#vala)
|
||||||
|
|
||||||
**Supported Beautifiers**: [`Uncrustify`](#uncrustify)
|
**Supported Beautifiers**: [`Uncrustify`](#uncrustify)
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
<App>
|
<App>
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<StatusBarBackground Dock="Top" />
|
<StatusBarBackground Dock="Top"/>
|
||||||
<ScrollView ClipToBounds="true">
|
<ScrollView ClipToBounds="true">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<Text FontSize="30">Hello, world!</Text>
|
<Text FontSize="30">Hello, world!</Text>
|
||||||
<Slider/>
|
<Slider/>
|
||||||
<Button Text="Button" />
|
<Button Text="Button"/>
|
||||||
<Switch Alignment="Left" /> </StackPanel>
|
<Switch Alignment="Left"/>
|
||||||
|
</StackPanel>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</App>
|
</App>
|
|
@ -278,7 +278,9 @@
|
||||||
"formatr",
|
"formatr",
|
||||||
"clojure",
|
"clojure",
|
||||||
"clojure beautifier",
|
"clojure beautifier",
|
||||||
"nunjucks"
|
"nunjucks",
|
||||||
|
"ux markup",
|
||||||
|
"cljfmt"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"coffeelint": "^1.10.1",
|
"coffeelint": "^1.10.1",
|
||||||
|
@ -291,4 +293,4 @@
|
||||||
"lint": "coffeelint src/ spec/",
|
"lint": "coffeelint src/ spec/",
|
||||||
"code-docs": "codo && open docs/code/index.html"
|
"code-docs": "codo && open docs/code/index.html"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -2,13 +2,13 @@
|
||||||
path = require('path')
|
path = require('path')
|
||||||
Beautifier = require('../beautifier')
|
Beautifier = require('../beautifier')
|
||||||
|
|
||||||
module.exports = class ClojureBeautifier extends Beautifier
|
module.exports = class Cljfmt extends Beautifier
|
||||||
|
|
||||||
name: "Clojure Beautifier"
|
name: "cljfmt"
|
||||||
link: "https://github.com/snoe/node-cljfmt"
|
link: "https://github.com/snoe/node-cljfmt"
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
Clojure: true
|
Clojure: false
|
||||||
}
|
}
|
||||||
|
|
||||||
beautify: (text, language, options) ->
|
beautify: (text, language, options) ->
|
|
@ -38,7 +38,7 @@ module.exports = class Beautifiers extends EventEmitter
|
||||||
'autopep8'
|
'autopep8'
|
||||||
'coffee-formatter'
|
'coffee-formatter'
|
||||||
'coffee-fmt'
|
'coffee-fmt'
|
||||||
'clojure-beautifier'
|
'cljfmt'
|
||||||
'clang-format'
|
'clang-format'
|
||||||
'crystal'
|
'crystal'
|
||||||
'dfmt'
|
'dfmt'
|
||||||
|
|
|
@ -61,7 +61,7 @@ module.exports = class PrettyDiff extends Beautifier
|
||||||
Twig: true
|
Twig: true
|
||||||
LESS: true
|
LESS: true
|
||||||
Swig: true
|
Swig: true
|
||||||
UX: true
|
"UX Markup": true
|
||||||
Visualforce: true
|
Visualforce: true
|
||||||
"Riot.js": true
|
"Riot.js": true
|
||||||
XTemplate: true
|
XTemplate: true
|
||||||
|
@ -90,7 +90,7 @@ module.exports = class PrettyDiff extends Beautifier
|
||||||
lang = "markup"
|
lang = "markup"
|
||||||
when "XML", "Visualforce", "SVG"
|
when "XML", "Visualforce", "SVG"
|
||||||
lang = "xml"
|
lang = "xml"
|
||||||
when "HTML", "UX"
|
when "HTML", "Nunjucks", "UX Markup"
|
||||||
lang = "html"
|
lang = "html"
|
||||||
when "JavaScript"
|
when "JavaScript"
|
||||||
lang = "javascript"
|
lang = "javascript"
|
||||||
|
|
|
@ -66,7 +66,7 @@ module.exports = class Languages
|
||||||
"tss"
|
"tss"
|
||||||
"twig"
|
"twig"
|
||||||
"typescript"
|
"typescript"
|
||||||
"ux"
|
"ux_markup"
|
||||||
"vala"
|
"vala"
|
||||||
"vue"
|
"vue"
|
||||||
"visualforce"
|
"visualforce"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
name: "UX"
|
name: "UX Markup"
|
||||||
namespace: "ux"
|
namespace: "ux"
|
||||||
fallback: ['html']
|
fallback: ['html']
|
||||||
|
|
Loading…
Reference in New Issue