Closed davidtessier closed 1 year ago
@davidtessier I was able to get this working. Remove the quotes around the path to SqlFormatter.exe. For example, this is what I have:
C:\SqlFormatter.1.6.10\SqlFormatter.exe ${file}
@davidtessier I was able to get this working. Remove the quotes around the path to SqlFormatter.exe. For example, this is what I have:
C:\SqlFormatter.1.6.10\SqlFormatter.exe ${file}
Thanks for the reply! I tried this and I get the same experience as before.
If I run the following in a command prompt, it works.
c:\PoormanSQL>SqlFormatter.exe "C:\Users\dave\OneDrive\DBeaver Projects\Project\Scripts\script.sql"
I'm wondering if it has something to do with my scripts living in a path that has spaces.
Hmm, I'm noticing now too that formatting commands are not recognized when using the Use temp file setting. Try unchecking the Use temp file checkbox, and remove the ${file} variable from the command. Then put whatever formatting parameters you want after the path, like this:
C:\path\to\SqlFormatter.exe -st 4 -mw 80 -sb 2 -cb 1 -sac -ebc -sk -uk -eil -ecl -ecs -ebe
This works for me. No quotes necessary.
x
That did it! The formatter is now working perfectly! Thank you so much.
Hey there,
I use DBeaver and have been trying to point to the command line version of PoorMans formatter but I have not been able to get it to work. I'm wondering what I have to do for this?
I set the external formatter command line to
"C:\SqlFormatter.1.6.10\SqlFormatter.exe" ${file}
which is my best guess. I've tried some other formats like alternating the slashes, removing quotes, but nothing works.I am not presented with an error, it just hangs for a moment, and then the code doesn't change.
Any help on this would be great! I'm running Windows 11 with DBeaver v23.0.0.x