Vscode-sqltools: Allow user to disable auto formatting `formatOnSave` and `formatOnPaste`

Created on 14 Jan 2019  路  6Comments  路  Source: mtxr/vscode-sqltools

Issue Type

  • [ ] Bug
  • [x] Enhancement
  • [ ] Feature Request
  • [ ] Question
  • [ ] Other

Prerequisites (For bugfixes)

  • [ ] Are you running the latest version?
  • [ ] Did you check the logs?
  • [ ] Did you check the Setup?

Description

Thx for this useful extension.
Anyway, it would be great to be able to disable automatic formatting, because my formatting rules are quite different.

Versions

  • Version: v0.15.1
  • OS: ...
  • SGDB: PostgresSQL...
enhancement formatting

Most helpful comment

Hi,
This doesn't seem to be working. The only way I can disable formatting for sql files is by disabling the extension....

All 6 comments

Hey @abenhamdine, actually auto formatting is a VSCode feature, not SQLTools.

Could you please check if you have formatOnSave and formatOnParte active in you vscode settings?

Could you please check if you have formatOnSave and formatOnParte active in you vscode settings?

Indeed yes, but autoformatting has never been applied on .sql files in vscode for me (and it was fine for us because we have our own sql style rules). it's just after have installed your extension that the autoformatting began to apply to .sql files.

Right, it's formatting because SQLTools register as a format tool.

I'll add this option, but it will be enabled by default since you are the first that noticed that, ok?

Thanks @abenhamdine

agree. Thanks to you @mtxr !

@abenhamdine you can achieve this by settings option formatLanguages to [].

Try it and let me know. It's better than having a option to complete disable the formatting.

Currently there is no way in vscode to disable just auto format via extension api. So for now, I'll keep it like this to avoid bigger issues, ok?

Let me know if this solves your problem.

Thanks.

Hi,
This doesn't seem to be working. The only way I can disable formatting for sql files is by disabling the extension....

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ladychili picture ladychili  路  7Comments

glha picture glha  路  7Comments

ransagy picture ransagy  路  7Comments

sideshow-systems picture sideshow-systems  路  4Comments

bergamin picture bergamin  路  3Comments