sqls
sqls copied to clipboard
Formatting issue on NixOS
trafficstars
Describe the bug Sqls removes whitespace on save etc.
Formats in an "incorrect" way
To Reproduce Steps to reproduce the behavior:
- Open neovim
- Save file
Expected behavior
On this code I expect nothing to happen
What actually happens:
Versions (please complete the following information):
- OS Version: NixOS 23.11.6621
- sqls Version: 0.2.28 ( Same thing happens on 0.2.22 )
Additional context My config:
require'lspconfig'.sqls.setup{
cmd = { "/run/current-system/sw/bin/sqls", "-config", "~/.config/sqls/config.yml"}
}
Have also tried:
require'lspconfig'.sqls.setup{
cmd = { "/run/current-system/sw/bin/sqls", "-config", "~/.config/sqls/config.yml"}
on_attach = function(client, bufnr)
require('sqls').on_attach(client, bufnr) -- require sqls.nvim
end
}
and
require'lspconfig'.sqls.setup{
--cmd = { "/run/current-system/sw/bin/sqls", "-config", "~/.config/sqls/config.yml"}
on_attach = function(client, bufnr)
require('sqls').on_attach(client, bufnr) -- require sqls.nvim
end
}
Config file:
lowercaseKeywords: false
I am installed the package via nix config ( unstable and stable tried ) not through mason ( as this leads to path issues ) ?
Nvim version 0.9.4
Same error on MacOS 14.4.1 (23E224) and sqls 0.2.28. The same error was on Nvim version 0.9.4 and on NVIM v0.10.0-dev-3119+gc7958356b. Config the same as in OP
Try this
on_attach = function(client, bufnr)
--
client.server_capabilities.documentFormattingProvider = false
client.server_capabilities.documentRangeFormattingProvider = false
--
end,