Add option for sqlformat to re-indent
This commit is contained in:
parent
78db075f83
commit
93aae32f8c
|
@ -17,7 +17,7 @@ module.exports = class Sqlformat extends Beautifier
|
|||
beautify: (text, language, options) ->
|
||||
@run("sqlformat", [
|
||||
@tempFile("input", text)
|
||||
"--reindent"
|
||||
"--reindent=#{options.reindent}" if options.reindent?
|
||||
"--indent_width=#{options.indent_size}" if options.indent_size?
|
||||
"--keywords=#{options.keywords}" if (options.keywords? && options.keywords != 'unchanged')
|
||||
"--identifiers=#{options.identifiers}" if (options.identifiers? && options.identifiers != 'unchanged')
|
||||
|
|
|
@ -26,6 +26,10 @@ module.exports = {
|
|||
default: null
|
||||
minimum: 0
|
||||
description: "Indentation size/length"
|
||||
reindent:
|
||||
type: 'boolean'
|
||||
default: true
|
||||
description: "Change indentations of the statements. Uncheck this option to preserve indentation"
|
||||
keywords:
|
||||
type: 'string'
|
||||
default: "upper"
|
||||
|
|
Loading…
Reference in New Issue