diff options
Diffstat (limited to 'lua/conform')
-rw-r--r-- | lua/conform/formatters/sqlfluff.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lua/conform/formatters/sqlfluff.lua b/lua/conform/formatters/sqlfluff.lua new file mode 100644 index 0000000..024df76 --- /dev/null +++ b/lua/conform/formatters/sqlfluff.lua @@ -0,0 +1,20 @@ +local util = require("conform.util") + +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://github.com/sqlfluff/sqlfluff", + description = "A modular SQL linter and auto-formatter with support for multiple dialects and templated code.", + }, + command = "sqlfluff", + args = { "fix", "--force", "--dialect=ansi", "-" }, + stdin = true, + cwd = util.root_file({ + ".sqlfluff", + "pep8.ini", + "pyproject.toml", + "setup.cfg", + "tox.ini", + }), + require_cwd = false, +} |