Skip to content
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

Weird formatting when queries contain create - or possibly caused by WSL? #901

Open
1 of 5 tasks
Dzejkop opened this issue May 17, 2022 · 2 comments
Open
1 of 5 tasks

Comments

@Dzejkop
Copy link

Dzejkop commented May 17, 2022

Describe the bug
When formatting a file with queries which contain create, the formatting removes spaces above said queries.

To Reproduce
Using the default "preserve" setting for linesBetweenQueries.

Take and format the following file:

select *
from foo;

create table foobar (id INTEGER NOT NOT NULL PRIMARY KEY);

select *
from bar;

The result on my machine looks like this:

select *
from foo;
create table foobar (id INTEGER NOT NOT NULL PRIMARY KEY);


select *
from bar;

Expected behavior
The formatting should respect the new lines between all queries.

Desktop (please complete the following information):

  • SQLTools Version 0.23.0
  • VSCode Version: 1.67.1
  • OS: Windows but running inside WSL (WSL os is OS: Ubuntu 20.04.4 LTS on Windows 10 x86_64 Kernel: 5.10.102.1-microsoft-standard-WSL2)
  • Driver:
    • PostgreSQL/Redshift
    • MySQL/MariaDB
    • MSSQL/Azure
    • SQLite
    • Other? Which...
  • Database version: sqlite3 3.31.1 2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837balt1
@gjsjohnmurray
Copy link
Collaborator

Does the advice at #887 (comment) about linesBetweenQueries help?

@Dzejkop
Copy link
Author

Dzejkop commented Jul 23, 2022

I imagine that would work, but I don't necessarily want line breaks between all queries. Really I just want to preserve what I have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants