vscode-sqltools
vscode-sqltools copied to clipboard
format.linesBetweenQueries "preserve" is not working?
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- edit a sql
- format sql
- "preserve" is not working, and linesBetweenQueries seems not correct.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
From the video:
-
"format.linesBetweenQueries": "preserve"
--> No lines -
"format.linesBetweenQueries": 1
--> No lines -
"format.linesBetweenQueries": 2
--> 1 line -
"format.linesBetweenQueries": 3
--> 2 lines
Desktop (please complete the following information):
- SQLTools Version [e.g. v0.17.x] 0.23.0
- VSCode Version: [e.g 1.x.y] 1.51.1
- OS: [e.g. Windows, Linux, Mac] Linux
- Driver:
- [ ] PostgreSQL/Redshift
- [ ] MySQL/MariaDB
- [ ] MSSQL/Azure
- [ ] SQLite
- [ ] Other? Which...
- Database version: [e.g. MySQL v5.6, PostgreSQL vX...]
Same issue here
- SQLTools Version: 0.23.0
- VSCode Version: 1.67.0
- OS: Linux
just a bystander note: Regarding the "linesBetweenQueries seems not correct" (e.g. 2 becomes 1 etc.), that is misunderstanding of the property. It is not number of empty lines between queries, but number of line breaks. Thus 1 line break means each query is on separate lines without any empty lines between them. 2 means 2 line breaks, meaning 1 empty line between queries and so on.
The config name is confusing here :) I actually stumbled on this when looking at similar problem in (I guess) original library https://github.com/sql-formatter-org/sql-formatter which this repo forked :)