Permalink
Browse files

Only use one layer in getConfiguration

  • Loading branch information...
1 parent d380d6d commit 10c4a4a63741778c32af810c86d4ad3d0bc26e68 Hooky committed Nov 16, 2016
Showing with 85 additions and 33 deletions.
  1. +1 −0 .jsbeautifyrc
  2. +3 −0 CHANGELOG.md
  3. +1 −1 extension.js
  4. +80 −32 package.json
View
@@ -6,6 +6,7 @@
"break_chained_methods": true,
"wrap_line_length": 120,
"end_with_newline": true,
+ "brace_style": "collapse-preserve-inline",
"unformatted": ["a", "abbr", "area", "audio", "b", "bdi", "bdo", "br", "button", "canvas", "cite", "code", "data",
"datalist", "del", "dfn", "em", "embed", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "map",
"mark", "math", "meter", "noscript", "object", "output", "progress", "q", "ruby", "s", "samp", "select", "small",
View
@@ -1,3 +1,6 @@
+### 0.5.5: 16 Nov 2016
+* Change setting retrieval mechanism. Fixes [#70 Compatibility with 1.8 Insiders](https://github.com/HookyQR/VSCodeBeautify/issues/70)
+
### 0.5.4: 05 Nov 2016
* Move changelog per VS Code 1.7 workings
* Change icon so it is visible on dark theme
View
@@ -107,8 +107,8 @@ class Formatters {
}
}
configure() {
- let cfg = vscode.workspace.getConfiguration('beautify.language');
let beautifyCfg = vscode.workspace.getConfiguration('beautify');
+ let cfg = beautifyCfg.language;
let js = beautifyCfg.JSFiles;
let css = beautifyCfg.CSSFiles;
let html = beautifyCfg.HTMLFiles;
View
@@ -2,13 +2,19 @@
"name": "beautify",
"displayName": "beautify",
"description": "Beautify code in place for VS Code",
- "version": "0.5.4",
+ "version": "0.5.5",
"publisher": "HookyQR",
"engines": {
"vscode": "^1.6.0"
},
- "categories": ["Other", "Languages", "Formatters"],
- "activationEvents": ["*"],
+ "categories": [
+ "Other",
+ "Languages",
+ "Formatters"
+ ],
+ "activationEvents": [
+ "*"
+ ],
"icon": "icon.svg",
"galleryBanner": {
"color": "#e8e030",
@@ -17,55 +23,92 @@
"license": "MIT",
"main": "./extension",
"contributes": {
- "languages": [{
- "id": "json",
- "aliases": ["JSON"],
- "filenames": [".jsbeautifyrc", ".jshintrc"]
- }],
- "jsonValidation": [{
- "fileMatch": ".jsbeautifyrc",
- "url": "./schema/beautifyrc.json"
- }],
- "commands": [{
- "command": "HookyQR.beautify",
- "title": "Beautify selection"
- }, {
- "command": "HookyQR.beautifyFile",
- "title": "Beautify file"
- }],
+ "languages": [
+ {
+ "id": "json",
+ "aliases": [
+ "JSON"
+ ],
+ "filenames": [
+ ".jsbeautifyrc",
+ ".jshintrc"
+ ]
+ }
+ ],
+ "jsonValidation": [
+ {
+ "fileMatch": ".jsbeautifyrc",
+ "url": "./schema/beautifyrc.json"
+ }
+ ],
+ "commands": [
+ {
+ "command": "HookyQR.beautify",
+ "title": "Beautify selection"
+ },
+ {
+ "command": "HookyQR.beautifyFile",
+ "title": "Beautify file"
+ }
+ ],
"configuration": {
"type": "object",
"title": "Beautify config",
"properties": {
"beautify.onSave": {
- "type": ["array"],
+ "type": [
+ "array"
+ ],
"default": false,
"description": "Use array to set indiviaul types to beautify: [\"js\", \"html\", \"css\"]. Requires \"editor.formatOnSave\" to be true.",
"items": {
"type": "string",
- "enum": ["js", "html", "css"],
+ "enum": [
+ "js",
+ "html",
+ "css"
+ ],
"description": "Set to beautify only provided types on save."
}
},
"beautify.onSaveIgnore": {
- "type": ["array"],
+ "type": [
+ "array"
+ ],
"description": "Set path/file matchers to ignore when attempting to beautify on save. Uses glob path matching.",
- "default": ["**/*+(.|_|-)min.*"]
+ "default": [
+ "**/*+(.|_|-)min.*"
+ ]
},
"beautify.language": {
"type": "object",
"description": "Link file types to the beautifier type",
"default": {
"js": {
- "type": ["javascript", "json"],
- "filename": [".jshintrc", ".jsbeautify"]
+ "type": [
+ "javascript",
+ "json"
+ ],
+ "filename": [
+ ".jshintrc",
+ ".jsbeautify"
+ ]
},
- "css": ["css", "scss"],
- "html": ["htm", "html"]
+ "css": [
+ "css",
+ "scss"
+ ],
+ "html": [
+ "htm",
+ "html"
+ ]
},
"properties": {
"js": {
- "type": ["object", "array"],
+ "type": [
+ "object",
+ "array"
+ ],
"items": {
"type": "string"
},
@@ -95,7 +138,10 @@
}
},
"css": {
- "type": ["object", "array"],
+ "type": [
+ "object",
+ "array"
+ ],
"items": {
"type": "string"
},
@@ -125,7 +171,10 @@
}
},
"html": {
- "type": ["object", "array"],
+ "type": [
+ "object",
+ "array"
+ ],
"items": {
"type": "string"
},
@@ -156,7 +205,6 @@
}
}
}
-
}
}
},
@@ -180,4 +228,4 @@
"bugs": {
"url": "https://github.com/HookyQR/VSCodeBeautify/issues"
}
-}
+}

0 comments on commit 10c4a4a

Please sign in to comment.