0

I installed the VS Code extension SQL Formatter and have the setting to Convert keywords to uppercase turned on. I have this setting on for both the User and Workspace.

I've restarted VS Code and still can't get the formatter to work. I have format on save turned on and it works for prettier but not this new extension. I have been testing it by opening a .sql file and changing 'SELECT' to 'select' to see if it would format on save back to the uppercase keyword. This is not working. It also does not make any changes when I right-click -> Format Document or when I shift+option+F on a Mac.

Any ideas to get this extension working? I'm considering trying pgFormatter extension instead and see if I have more luck with that.

nm12
  • 81
  • 7

2 Answers2

0

Well, I think it's because its a javascript library and maybe it only works in a javascript file shrug

nm12
  • 81
  • 7
0

you can add this to your settings.json in your .vscode-folder

{
  "[sql]": {
    "editor.defaultFormatter": "{{your desired sql-formatter}}"
  }
}