Merge branch 'jdcrensh-master'
This commit is contained in:
commit
bd2093433a
|
@ -125,7 +125,31 @@ Supported options for each language.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
#### [Arduino - Config Path](#arduino---config-path)
|
#### [Apex - Config Path](#apex---config-path)
|
||||||
|
|
||||||
|
**Namespace**: `apex`
|
||||||
|
|
||||||
|
**Key**: `configPath`
|
||||||
|
|
||||||
|
**Type**: `string`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`Uncrustify`](#uncrustify)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"apex": {
|
||||||
|
"configPath": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### [Arduino - Config Path](#arduino---config-path)
|
||||||
|
|
||||||
**Namespace**: `arduino`
|
**Namespace**: `arduino`
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
class Aligns {
|
||||||
|
final int SZF = 4;
|
||||||
|
final int SZ2F = 4;
|
||||||
|
final int aBarF;
|
||||||
|
final int[] someMoreIntsF;
|
||||||
|
final Tem<Plate> edVarF;
|
||||||
|
final int aBarSetF=null;
|
||||||
|
final int[] someMoreIntsSetF=null;
|
||||||
|
final Tem<Plate> edVarF=null;
|
||||||
|
int SZ = 4;
|
||||||
|
int SZ2 = 4;
|
||||||
|
int aBar;
|
||||||
|
int spacer;
|
||||||
|
int[] someMoreInts;
|
||||||
|
Tem<Plate> edVar;
|
||||||
|
int aBarSet=null;
|
||||||
|
int[] someMoreIntsSet=null;
|
||||||
|
Tem<Plate> edVar=null;
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
class Aligns {
|
||||||
|
final Integer SZF = 4;
|
||||||
|
final Integer SZ2F = 4;
|
||||||
|
final Integer aBarF;
|
||||||
|
final Integer[] someMoreIntegersF;
|
||||||
|
final Tem<Plate> edVarF;
|
||||||
|
final Integer aBarSetF=null;
|
||||||
|
final Integer[] someMoreIntegersSetF=null;
|
||||||
|
final Tem<Plate> edVarF=null;
|
||||||
|
Integer SZ = 4;
|
||||||
|
Integer SZ2 = 4;
|
||||||
|
Integer aBar;
|
||||||
|
Integer spacer;
|
||||||
|
Integer[] someMoreIntegers;
|
||||||
|
Tem<Plate> edVar;
|
||||||
|
Integer aBarSet=null;
|
||||||
|
Integer[] someMoreIntegersSet=null;
|
||||||
|
Tem<Plate> edVar=null;
|
||||||
|
}
|
|
@ -155,6 +155,7 @@
|
||||||
"coldfusion",
|
"coldfusion",
|
||||||
"uncrustify",
|
"uncrustify",
|
||||||
"java",
|
"java",
|
||||||
|
"apex",
|
||||||
"pawn",
|
"pawn",
|
||||||
"vala",
|
"vala",
|
||||||
"d",
|
"d",
|
||||||
|
|
|
@ -21,7 +21,7 @@ describe "BeautifyLanguages", ->
|
||||||
|
|
||||||
# Activate all of the languages
|
# Activate all of the languages
|
||||||
allLanguages = [
|
allLanguages = [
|
||||||
"c", "coffee-script", "css", "d", "html",
|
"apex", "c", "coffee-script", "css", "d", "html",
|
||||||
"java", "javascript", "json", "less",
|
"java", "javascript", "json", "less",
|
||||||
"mustache", "objective-c", "perl", "php",
|
"mustache", "objective-c", "perl", "php",
|
||||||
"python", "ruby", "sass", "sql", "svg",
|
"python", "ruby", "sass", "sql", "svg",
|
||||||
|
@ -61,7 +61,7 @@ describe "BeautifyLanguages", ->
|
||||||
|
|
||||||
# Set Uncrustify config path
|
# Set Uncrustify config path
|
||||||
# uncrustifyConfigPath = path.resolve(__dirname, "../examples/nested-jsbeautifyrc/uncrustify.cfg")
|
# uncrustifyConfigPath = path.resolve(__dirname, "../examples/nested-jsbeautifyrc/uncrustify.cfg")
|
||||||
# uncrustifyLangs = ["c", "cpp", "objectivec", "cs", "d", "java", "pawn", "vala"]
|
# uncrustifyLangs = ["apex", "c", "cpp", "objectivec", "cs", "d", "java", "pawn", "vala"]
|
||||||
# for lang in uncrustifyLangs
|
# for lang in uncrustifyLangs
|
||||||
# do (lang) ->
|
# do (lang) ->
|
||||||
# atom.config.set("atom-beautify.#{lang}_configPath", uncrustifyConfigPath)
|
# atom.config.set("atom-beautify.#{lang}_configPath", uncrustifyConfigPath)
|
||||||
|
|
|
@ -11,6 +11,7 @@ _ = require('lodash')
|
||||||
module.exports = class Uncrustify extends Beautifier
|
module.exports = class Uncrustify extends Beautifier
|
||||||
name: "Uncrustify"
|
name: "Uncrustify"
|
||||||
options: {
|
options: {
|
||||||
|
Apex: true
|
||||||
C: true
|
C: true
|
||||||
"C++": true
|
"C++": true
|
||||||
"C#": true
|
"C#": true
|
||||||
|
@ -50,6 +51,8 @@ module.exports = class Uncrustify extends Beautifier
|
||||||
# Select Uncrustify language
|
# Select Uncrustify language
|
||||||
lang = "C" # Default is C
|
lang = "C" # Default is C
|
||||||
switch language
|
switch language
|
||||||
|
when "Apex"
|
||||||
|
lang = "Apex"
|
||||||
when "C"
|
when "C"
|
||||||
lang = "C"
|
lang = "C"
|
||||||
when "C++"
|
when "C++"
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
module.exports = {
|
||||||
|
|
||||||
|
name: "Apex"
|
||||||
|
namespace: "apex"
|
||||||
|
|
||||||
|
###
|
||||||
|
Supported Grammars
|
||||||
|
###
|
||||||
|
grammars: [
|
||||||
|
"Apex"
|
||||||
|
]
|
||||||
|
|
||||||
|
###
|
||||||
|
Supported extensions
|
||||||
|
###
|
||||||
|
extensions: [
|
||||||
|
"cls"
|
||||||
|
]
|
||||||
|
|
||||||
|
options:
|
||||||
|
configPath:
|
||||||
|
type: 'string'
|
||||||
|
default: ""
|
||||||
|
description: "Path to uncrustify config file. i.e. uncrustify.cfg"
|
||||||
|
|
||||||
|
}
|
|
@ -12,6 +12,7 @@ module.exports = class Languages
|
||||||
# Supported unique configuration keys
|
# Supported unique configuration keys
|
||||||
# Used for detecting nested configurations in .jsbeautifyrc
|
# Used for detecting nested configurations in .jsbeautifyrc
|
||||||
languageNames: [
|
languageNames: [
|
||||||
|
"apex"
|
||||||
"arduino"
|
"arduino"
|
||||||
"c-sharp"
|
"c-sharp"
|
||||||
"c"
|
"c"
|
||||||
|
|
Loading…
Reference in New Issue