Emacs: format SQL files on save
Alan Pearce alan@alanpearce.eu
Wed, 26 Aug 2020 14:07:10 +0200
3 files changed, 8 insertions(+), 0 deletions(-)
M user/emacs/init.el → user/emacs/init.el
@@ -919,6 +919,12 @@ :ghook ('(javascript-mode-hook typescript-mode-hook) #'prettier-js-mode t) :config (progn (setq prettier-js-show-errors 'echo))) +(use-package sqlformat + :ghook ('sql-mode-hook sqlformat-on-save-mode) + :config (progn + (setq sqlformat-command 'pgformatter + sqlformat-args '("-s2")))) + ;;; E-mail (declare-function sendmail-send-it "sendmail")
M user/settings/emacs.nix → user/settings/emacs.nix
@@ -167,6 +167,7 @@ ripgrep rjsx-mode scss-mode spacemacs-theme + sqlformat swiper tide toml-mode
M user/settings/satoshipay.nix → user/settings/satoshipay.nix
@@ -19,6 +19,7 @@ caddy openssl mongodb-tools pgcli + pgformatter s3cmd sops