From 32fba8bf1a64081d930fd2aff19a9c14e996fef3 Mon Sep 17 00:00:00 2001 From: Jack Treble Date: Tue, 16 Jan 2018 22:32:08 +0000 Subject: [PATCH] Fix Beautify File option by adding indent_size and indent_char options --- CHANGELOG.md | 1 + src/languages/lua.coffee | 9 ++++++ src/options.json | 61 +++++++++++++++++++--------------------- 3 files changed, 39 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3284e8d..029e200 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Next - Fix [#1862](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for ocp-indent as an executable +- Fix Beauify File option for .lua files # v0.30.9 (2017-11-22) - Fix [#1949](https://github.com/Glavin001/atom-beautify/issues/1949): Fix beautify on save when text has not changed. diff --git a/src/languages/lua.coffee b/src/languages/lua.coffee index 2a08a28..effe384 100644 --- a/src/languages/lua.coffee +++ b/src/languages/lua.coffee @@ -21,6 +21,15 @@ module.exports = { defaultBeautifier: "Lua beautifier" options: + indent_size: + type: 'integer' + default: null + minimum: 0 + description: "Indentation size/length" + indent_char: + type: 'string' + default: null + description: "Indentation character" end_of_line: type: 'string' default: "System Default" diff --git a/src/options.json b/src/options.json index 35bda1b..b5407c1 100644 --- a/src/options.json +++ b/src/options.json @@ -4582,6 +4582,35 @@ "ttslua" ], "properties": { + "indent_size": { + "type": "integer", + "default": null, + "minimum": 0, + "description": "Indentation size/length (Supported by Lua beautifier)", + "title": "Indent size", + "beautifiers": [ + "Lua beautifier" + ], + "key": "indent_size", + "language": { + "name": "Lua", + "namespace": "lua" + } + }, + "indent_char": { + "type": "string", + "default": null, + "description": "Indentation character (Supported by Lua beautifier)", + "title": "Indent char", + "beautifiers": [ + "Lua beautifier" + ], + "key": "indent_char", + "language": { + "name": "Lua", + "namespace": "lua" + } + }, "end_of_line": { "type": "string", "default": "System Default", @@ -9320,22 +9349,6 @@ } } }, - "ocp-indent": { - "key": "ocp-indent", - "title": "ocp-indent", - "type": "object", - "collapsed": true, - "description": "Options for ocp-indent executable.", - "properties": { - "path": { - "key": "path", - "title": "Binary/Script Path", - "type": "string", - "default": "", - "description": "Absolute path to the \"ocp-indent\" executable's binary/script." - } - } - }, "php": { "key": "php", "title": "PHP", @@ -9384,22 +9397,6 @@ } } }, - "puppet-lint": { - "key": "puppet-lint", - "title": "puppet-lint", - "type": "object", - "collapsed": true, - "description": "Options for puppet-lint executable.", - "properties": { - "path": { - "key": "path", - "title": "Binary/Script Path", - "type": "string", - "default": "", - "description": "Absolute path to the \"puppet-lint\" executable's binary/script." - } - } - }, "sass-convert": { "key": "sass-convert", "title": "SassConvert",