-
Notifications
You must be signed in to change notification settings - Fork 69
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
sqls formating removes all whitespaces #149
Comments
It looks like this "only" seems to happen on non- |
It looks like in sqls/internal/formatter/formatter.go Line 135 in c95deb1
CREATE or VARCHAR .
I can see a diff like so: diff --git internal/formatter/formatter.go internal/formatter/formatter.go
index 15cbf96..e17d485 100644
--- internal/formatter/formatter.go
+++ internal/formatter/formatter.go
@@ -144,6 +144,8 @@ func formatItem(node ast.Node, env *formatEnvironment) ast.Node {
"LIMIT",
"WHEN",
"ELSE",
+ "CREATE",
+ "TABLE",
},
}
if whitespaceAfterMatcher.IsMatch(node) { Will start to do this correctly, but not sure if we want to allowlist each keyword + combination? (I realise that's how it's currently already done) |
Disable the lsp formatting for this language server as there's a bug currently that removes all whitespaces. See sqls-server/sqls#149
Is the problem solved? |
As per the unclosed issue / unmerged PRs, no, it's still present |
Expected Behavior
Actual Behavior
I'm not sure how it started, I was using nvim and setting up for postgres with lsqconfig,
because I have same issue,for work around I added to
~/.config/sqls/config.yml
following:it's clearly not related to error, but after that in some point, formatter started going crazy. Now I removed all configs from every corner but this bug persists
The text was updated successfully, but these errors were encountered: