diff --git a/lua/efmls-configs/formatters/sqlfluff.lua b/lua/efmls-configs/formatters/sqlfluff.lua new file mode 100644 index 0000000..ba487cc --- /dev/null +++ b/lua/efmls-configs/formatters/sqlfluff.lua @@ -0,0 +1,16 @@ +-- Metadata +-- languages: sql +-- url: https://github.com/sql-formatter-org/sql-formatter + +local fs = require('efmls-configs.fs') + +local formatter = 'sqlfluff' +local command = string.format( + '%s format --dialect ansi --nocolor --ignore ${INPUT}', + fs.executable(formatter, fs.Scope.NODE) +) + +return { + formatCommand = command, + formatStdin = false, +}