Merge branch 'cfml' of git://github.com/finalcut/atom-beautify into finalcut-cfml
This commit is contained in:
commit
e90a6335e3
|
@ -2223,6 +2223,61 @@ Automatically beautify CoffeeScript files on save
|
|||
2. Go into *Packages* and search for "*Atom Beautify*" package.
|
||||
3. Find the option "*Language Config - CoffeeScript - Beautify On Save*" and change it to your desired configuration.
|
||||
|
||||
#### [Language Config - Coldfusion - Disable Beautifying Language](#language-config---coldfusion---disable-beautifying-language)
|
||||
|
||||
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Description**:
|
||||
|
||||
Disable Coldfusion 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 "*Language Config - Coldfusion - Disable Beautifying Language*" and change it to your desired configuration.
|
||||
|
||||
#### [Language Config - Coldfusion - Default Beautifier](#language-config---coldfusion---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 Coldfusion
|
||||
|
||||
**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 "*Language Config - Coldfusion - Default Beautifier*" and change it to your desired configuration.
|
||||
|
||||
#### [Language Config - Coldfusion - Beautify On Save](#language-config---coldfusion---beautify-on-save)
|
||||
|
||||
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Description**:
|
||||
|
||||
Automatically beautify Coldfusion 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 "*Language Config - Coldfusion - Beautify On Save*" and change it to your desired configuration.
|
||||
|
||||
#### [Language Config - C++ - Disable Beautifying Language](#language-config---c---disable-beautifying-language)
|
||||
|
||||
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||
|
|
|
@ -7,6 +7,21 @@
|
|||
max_preserve_newlines: 1
|
||||
preserve_newlines: true
|
||||
wrap_line_length: 0
|
||||
cfml:
|
||||
brace_style: "collapse"
|
||||
indent_char: " "
|
||||
indent_scripts: "normal"
|
||||
indent_size: 2
|
||||
max_preserve_newlines: 1
|
||||
preserve_newlines: true
|
||||
unformatted:
|
||||
- "a"
|
||||
- "sub"
|
||||
- "sup"
|
||||
- "b"
|
||||
- "i"
|
||||
- "u"
|
||||
wrap_line_length: 0
|
||||
css:
|
||||
indent_char: " "
|
||||
indent_size: 2
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<cfcomponent output="no">
|
||||
<cffunction name="init" output="false" returntype="any">
|
||||
<cfscript>
|
||||
variables.instance = structNew();
|
||||
return this;
|
||||
</cfscript>
|
||||
</cffunction>
|
||||
</cfcomponent>
|
|
@ -0,0 +1,8 @@
|
|||
<cfcomponent output="no">
|
||||
<cffunction name="init" output="false" returntype="any">
|
||||
<cfscript>
|
||||
variables.instance = structNew();
|
||||
return this;
|
||||
</cfscript>
|
||||
</cffunction>
|
||||
</cfcomponent>
|
|
@ -3,7 +3,7 @@
|
|||
"main": "./src/beautify",
|
||||
"version": "0.28.22",
|
||||
"private": true,
|
||||
"description": "Beautify HTML, CSS, JavaScript, PHP, Python, Ruby, Java, C, C++, C#, Objective-C, CoffeeScript, TypeScript, and SQL in Atom",
|
||||
"description": "Beautify HTML, CSS, JavaScript, PHP, Python, Ruby, Java, C, C++, C#, Objective-C, CoffeeScript, TypeScript, Coldfusion, and SQL in Atom",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Glavin001/atom-beautify"
|
||||
|
@ -147,6 +147,7 @@
|
|||
"objective-c",
|
||||
"c-sharp",
|
||||
"c#",
|
||||
"coldfusion",
|
||||
"uncrustify",
|
||||
"java",
|
||||
"pawn",
|
||||
|
|
|
@ -35,6 +35,7 @@ module.exports = class PrettyDiff extends Beautifier
|
|||
]
|
||||
# Apply language-specific options
|
||||
CSV: true
|
||||
Coldfusion: true
|
||||
ERB: true
|
||||
EJS: true
|
||||
HTML: true
|
||||
|
@ -65,6 +66,8 @@ module.exports = class PrettyDiff extends Beautifier
|
|||
switch language
|
||||
when "CSV"
|
||||
lang = "csv"
|
||||
when "Coldfusion"
|
||||
lang = "html"
|
||||
when "EJS", "Twig"
|
||||
lang = "ejs"
|
||||
when "ERB"
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
scope = ['text.html']
|
||||
tabLength = atom?.config.get('editor.tabLength', scope: scope) ? 4
|
||||
softTabs = atom?.config.get('editor.softTabs', scope: scope) ? true
|
||||
defaultIndentSize = (if softTabs then tabLength else 1)
|
||||
defaultIndentChar = (if softTabs then " " else "\t")
|
||||
defaultIndentWithTabs = not softTabs
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: "Coldfusion"
|
||||
description: "Coldfusion Markup; cfscript is also handled via the prettydiff javascript parser"
|
||||
namespace: "cfml"
|
||||
|
||||
###
|
||||
Supported Grammars
|
||||
###
|
||||
grammars: [
|
||||
"html"
|
||||
]
|
||||
|
||||
###
|
||||
Supported extensions
|
||||
###
|
||||
extensions: [
|
||||
"cfm"
|
||||
"cfml"
|
||||
"cfc"
|
||||
]
|
||||
|
||||
options:
|
||||
indent_inner_html:
|
||||
type: 'boolean'
|
||||
default: false
|
||||
description: "Indent <head> and <body> sections."
|
||||
indent_size:
|
||||
type: 'integer'
|
||||
default: defaultIndentSize
|
||||
minimum: 0
|
||||
description: "Indentation size/length"
|
||||
indent_char:
|
||||
type: 'string'
|
||||
default: defaultIndentChar
|
||||
minimum: 0
|
||||
description: "Indentation character"
|
||||
brace_style:
|
||||
type: 'string'
|
||||
default: "collapse"
|
||||
enum: ["collapse", "expand", "end-expand", "none"]
|
||||
description: "[collapse|expand|end-expand|none]"
|
||||
indent_scripts:
|
||||
type: 'string'
|
||||
default: "normal"
|
||||
enum: ["keep", "separate", "normal"]
|
||||
description: "[keep|separate|normal]"
|
||||
wrap_line_length:
|
||||
type: 'integer'
|
||||
default: 250
|
||||
description: "Maximum characters per line (0 disables)"
|
||||
wrap_attributes:
|
||||
type: 'string'
|
||||
default: "auto"
|
||||
enum: ["auto", "force"]
|
||||
description: "Wrap attributes to new lines [auto|force]"
|
||||
wrap_attributes_indent_size:
|
||||
type: 'integer'
|
||||
default: defaultIndentSize
|
||||
minimum: 0
|
||||
description: "Indent wrapped attributes to after N characters"
|
||||
preserve_newlines:
|
||||
type: 'boolean'
|
||||
default: true
|
||||
description: "Preserve line-breaks"
|
||||
max_preserve_newlines:
|
||||
type: 'integer'
|
||||
default: 10
|
||||
description: "Number of line-breaks to be preserved in one chunk"
|
||||
unformatted:
|
||||
type: 'array'
|
||||
default: ['a', 'sub', 'sup', 'b', 'i', 'u']
|
||||
items:
|
||||
type: 'string'
|
||||
description: "List of tags (defaults to inline) that should not be reformatted"
|
||||
end_with_newline:
|
||||
type: 'boolean'
|
||||
default: false
|
||||
description: "End output with newline"
|
||||
extra_liners:
|
||||
type: 'array'
|
||||
default: ['head', 'body', '/html']
|
||||
items:
|
||||
type: 'string'
|
||||
description: "List of tags (defaults to [head,body,/html] that should have an extra newline before them."
|
||||
|
||||
}
|
|
@ -16,6 +16,7 @@ module.exports = class Languages
|
|||
"c-sharp"
|
||||
"c"
|
||||
"coffeescript"
|
||||
"coldfusion"
|
||||
"cpp"
|
||||
"css"
|
||||
"csv"
|
||||
|
|
Loading…
Reference in New Issue