vscode-sql-formatter
vscode-sql-formatter copied to clipboard
unnecessary spaces added after $ and {
I really like using this extension but there is one thing that keeps me from using it
I use pg-promise and it substitutes variables using something like this:
where
id = ${k}
but the formatter will turn it into this:
where
id = $ { k }
and this breaks pg-promise.
Also I use dbt and it has macros that look like this:
{#- comment #}
{{ ref('table') }}
sql-formatter turns it into
{ #- comment #}
{ { ref('table') } }
I would prefer without the space after {
and $
if possible :dango:
actually it breaks dbt too I just realized
I guess I will just do sed -i 's/{ {/{{/g' *; and sed -i 's/} }/}}/g' *
for the time being
The extra spaces are breaking my (postgress) function definitions :
root_id numeric,
id numeric,
level int,
name text,
root boolean
) language sql as $$ with ...etc.```
Hi, I'm having this same problem with TSQL using the Merge statement where $Action is a valid/required token. The formatter insists on putting a space after the $, breaking that part of my code.
Same issue, If this was fixed it would make the plugin usable. 400k downloads and it hasn't been updated in 3 years. @kufii what gives?