diff options
author | Alan Pearce | 2020-08-26 14:07:10 +0200 |
---|---|---|
committer | Alan Pearce | 2020-08-26 14:07:10 +0200 |
commit | 8183780e3193c469de85d24038ceb8ec1e3bac61 (patch) | |
tree | 8d68bb19286d23bc5267268a3aae4cec771f94a7 | |
parent | 36257b88baa227337e9ea70df9e8bb8318adafca (diff) | |
download | nixfiles-8183780e3193c469de85d24038ceb8ec1e3bac61.tar.lz nixfiles-8183780e3193c469de85d24038ceb8ec1e3bac61.tar.zst nixfiles-8183780e3193c469de85d24038ceb8ec1e3bac61.zip |
Emacs: format SQL files on save
-rw-r--r-- | user/emacs/init.el | 6 | ||||
-rw-r--r-- | user/settings/emacs.nix | 1 | ||||
-rw-r--r-- | user/settings/satoshipay.nix | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el index 053cecb4..31e06e4d 100644 --- a/user/emacs/init.el +++ b/user/emacs/init.el @@ -919,6 +919,12 @@ _p_rev _u_pper _=_: upper/lower _r_esolve :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") diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix index 3d353bcc..2acd1269 100644 --- a/user/settings/emacs.nix +++ b/user/settings/emacs.nix @@ -167,6 +167,7 @@ in rjsx-mode scss-mode spacemacs-theme + sqlformat swiper tide toml-mode diff --git a/user/settings/satoshipay.nix b/user/settings/satoshipay.nix index ac33508b..d71152ce 100644 --- a/user/settings/satoshipay.nix +++ b/user/settings/satoshipay.nix @@ -19,6 +19,7 @@ in openssl mongodb-tools pgcli + pgformatter s3cmd sops |