diff --git a/src/beautifiers/lua-beautifier/index.coffee b/src/beautifiers/lua-beautifier/index.coffee index 05ea2f1..a6be501 100644 --- a/src/beautifiers/lua-beautifier/index.coffee +++ b/src/beautifiers/lua-beautifier/index.coffee @@ -11,13 +11,20 @@ module.exports = class Lua extends Beautifier link: "https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/lua-beautifier/beautifier.coffee" options: { - Lua: true + Lua: { + indent_size: true + indent_char: true + end_of_line: true + } } beautify: (text, language, options) -> - options.eol = @getDefaultLineEnding('\r\n','\n',options.end_of_line) + options.eol = @getDefaultLineEnding('\r\n','\n', options.end_of_line) + indentChar = options.indent_char or " " + indentSize = options.indent_size + indent = indentChar.repeat(indentSize) new @Promise (resolve, reject) -> try - resolve format text, options.indent_char.repeat(options.indent_size), @warn, options + resolve(format(text, indent, @warn, options)); catch error reject error