From 0f82daa55c8707472268c254c66fd8eb3718aa2a Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Sun, 11 Sep 2016 21:14:44 -0300 Subject: [PATCH] Clean up some PR code --- README.md | 3 +- docs/options.md | 183 +++++++++++++++++- .../test.html => ux-markup/expected/test.ux} | 9 +- .../test.html => ux-markup/original/test.ux} | 0 package.json | 6 +- .../{clojure-beautifier => cljfmt}/fmt.edn | 0 .../index.coffee | 6 +- src/beautifiers/index.coffee | 2 +- src/beautifiers/prettydiff.coffee | 4 +- src/languages/index.coffee | 2 +- src/languages/{ux.coffee => ux_markup.coffee} | 2 +- 11 files changed, 199 insertions(+), 18 deletions(-) rename examples/simple-jsbeautifyrc/{ux/expected/test.html => ux-markup/expected/test.ux} (57%) rename examples/simple-jsbeautifyrc/{ux/original/test.html => ux-markup/original/test.ux} (100%) rename src/beautifiers/{clojure-beautifier => cljfmt}/fmt.edn (100%) rename src/beautifiers/{clojure-beautifier => cljfmt}/index.coffee (81%) rename src/languages/{ux.coffee => ux_markup.coffee} (91%) diff --git a/README.md b/README.md index 2042ee7..447c4c0 100644 --- a/README.md +++ b/README.md @@ -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) | | 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) | -| 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) | | 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) | @@ -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) | | Twig | `HTML (Twig)` |`.twig` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (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) | | Visualforce | `Visualforce` |`.page` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | Vue | `Vue Component` |`.vue` | `Vue Beautifier` (Default) | diff --git a/docs/options.md b/docs/options.md index 1c4596c..dc04f03 100644 --- a/docs/options.md +++ b/docs/options.md @@ -592,9 +592,9 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff) #### [Clojure](#clojure) -**Supported Beautifiers**: [`Clojure Beautifier`](#clojure-beautifier) +**Supported Beautifiers**: [`cljfmt`](#cljfmt) -| Option | Clojure Beautifier | +| Option | cljfmt | | --- | --- | | `disabled` | :white_check_mark: | | `default_beautifier` | :white_check_mark: | @@ -629,7 +629,7 @@ Disable Clojure Beautification **Type**: `string` -**Enum**: `Clojure Beautifier` +**Enum**: `cljfmt` **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) **Supported Beautifiers**: [`Uncrustify`](#uncrustify) diff --git a/examples/simple-jsbeautifyrc/ux/expected/test.html b/examples/simple-jsbeautifyrc/ux-markup/expected/test.ux similarity index 57% rename from examples/simple-jsbeautifyrc/ux/expected/test.html rename to examples/simple-jsbeautifyrc/ux-markup/expected/test.ux index 999feea..50da5d5 100644 --- a/examples/simple-jsbeautifyrc/ux/expected/test.html +++ b/examples/simple-jsbeautifyrc/ux-markup/expected/test.ux @@ -1,12 +1,13 @@ - + Hello, world! -