From 9b1b09db58ff7bb8c0a8d183c6ad348a07089826 Mon Sep 17 00:00:00 2001 From: CongLuanTran Date: Mon, 25 Aug 2025 23:27:43 +0700 Subject: [PATCH 1/3] fix(sql): Remove forced ansi dialect for sqlfluff --- lua/astrocommunity/pack/sql/init.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lua/astrocommunity/pack/sql/init.lua b/lua/astrocommunity/pack/sql/init.lua index e578774aa..4d2eddffa 100644 --- a/lua/astrocommunity/pack/sql/init.lua +++ b/lua/astrocommunity/pack/sql/init.lua @@ -34,12 +34,8 @@ return { opts.handlers.sqlfluff = function() local null_ls = require "null-ls" - null_ls.register(null_ls.builtins.diagnostics.sqlfluff.with { - extra_args = { "--dialect", "ansi" }, - }) - null_ls.register(null_ls.builtins.formatting.sqlfluff.with { - extra_args = { "--dialect", "ansi" }, - }) + null_ls.register(null_ls.builtins.diagnostics.sqlfluff) + null_ls.register(null_ls.builtins.formatting.sqlfluff) end end, }, From 9bd9565c05364e7744813d9a0b830bdf5d99825b Mon Sep 17 00:00:00 2001 From: CongLuanTran Date: Wed, 27 Aug 2025 23:08:10 +0700 Subject: [PATCH 2/3] fix(sql): Modify README to add instruction for `sqlfluff` --- lua/astrocommunity/pack/sql/README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/astrocommunity/pack/sql/README.md b/lua/astrocommunity/pack/sql/README.md index bacb4c76b..4068168b9 100644 --- a/lua/astrocommunity/pack/sql/README.md +++ b/lua/astrocommunity/pack/sql/README.md @@ -7,4 +7,11 @@ This plugin pack does the following: - `go` must be in your `PATH` and executable. - formatting is disabled due to https://github.com/sqls-server/sqls/issues/149 - Adds [sqls.nvim](https://github.com/nanotee/sqls.nvim) for language specific tooling -- Adds `sqlfluff` for both formatting and linting (using the ANSI dialect) +- Adds `sqlfluff` for both formatting and linting + - You must create a `.sqlfluff` file in the same folder as your sql files + - The `.sqlfluff` file must define the sql dialect to be used + - Example, more details can be found [here](https://docs.sqlfluff.com/en/stable/configuration/index.html): + ```ini + [sqlfluff] + dialect = postgres + ``` From 7550627d736e0b0fe241cf6b90e5d4c89cd67905 Mon Sep 17 00:00:00 2001 From: Uzair Aftab <48220549+Uzaaft@users.noreply.github.com> Date: Fri, 29 Aug 2025 12:16:15 +0200 Subject: [PATCH 3/3] Update README.md --- lua/astrocommunity/pack/sql/README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lua/astrocommunity/pack/sql/README.md b/lua/astrocommunity/pack/sql/README.md index 4068168b9..bed4d6bca 100644 --- a/lua/astrocommunity/pack/sql/README.md +++ b/lua/astrocommunity/pack/sql/README.md @@ -7,11 +7,4 @@ This plugin pack does the following: - `go` must be in your `PATH` and executable. - formatting is disabled due to https://github.com/sqls-server/sqls/issues/149 - Adds [sqls.nvim](https://github.com/nanotee/sqls.nvim) for language specific tooling -- Adds `sqlfluff` for both formatting and linting - - You must create a `.sqlfluff` file in the same folder as your sql files - - The `.sqlfluff` file must define the sql dialect to be used - - Example, more details can be found [here](https://docs.sqlfluff.com/en/stable/configuration/index.html): - ```ini - [sqlfluff] - dialect = postgres - ``` +- Adds [sqlfluff](https://docs.sqlfluff.com) for both formatting and linting