-
-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable the default SQL formatter #1323
Comments
There are also (available on Mason):
But I've never used any of them before, so don't know which one is better suited. |
sleek also seems unmaintained. |
The best candidate seems to be sqlfluff |
Would it be better to create another pack just with sqlfluff and leave the current SQL pack as is (maybe mention this formatting issue in the readme)? Since sqlfluff can be used both as a linter and a formatter: https://github.com/LazyVim/LazyVim/blob/4e8d75144de92e62eb58c87f61938118d3b1e37c/lua/lazyvim/plugins/extras/lang/sql.lua#L144C1-L171C5 |
Id vote against it. We could change it and just mark it as a breaking change and get on with it. |
I'm having a slight issue configuring sqlfluff. It doesn't have a default lspconfig config, but when using none-ls, I can't seem to provide a default SQL dialect option. I set it as described in the documentation, but it doesn't apply. Without it, nothing works. I've used https://github.com/AstroNvim/astrocommunity/blob/main/lua/astrocommunity/pack/nix/init.lua as an example of configuring none-ls and the rest. https://github.com/nvimtools/none-ls.nvim/blob/main/doc/BUILTINS.md#sqlfluff @Uzaaft Could you please give some hints on how to proceed? I'm having skill issues here 😄 |
This is what I have at the moment: |
I am drowning in work this week, but I will try and take a look during the weekend @azdanov |
Is your feature related to a problem?
Should the default formatting be disabled for the SQL pack?
It uses
sqls
, which hasn't been maintained for a while, and there is an ongoing issue that causes some SQL statements to be broken by the formatter: sqls-server/sqls#149Describe the new feature
Either update the readme and add an example of how to disable the formatting, leaving a warning note that this issue occurs, or disable the formatting by default in the SQL pack.
An alternative would be to find a replacement formatter.
Additional context
In the comments of the
sqls
, someone mentioned https://github.com/nrempel/sleek for formatting, but I couldn't find it in Mason.The text was updated successfully, but these errors were encountered: