From f477186ecc12ac025a9948d17edc69242e1ee96b Mon Sep 17 00:00:00 2001 From: Arnold Chand Date: Tue, 7 May 2024 13:38:17 -0400 Subject: [PATCH] feat(formatters): add sqlfluff --- lua/efmls-configs/formatters/sqlfluff.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lua/efmls-configs/formatters/sqlfluff.lua 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, +}