use pg_format

Wed, 16 Jun 2021 12:22:40 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Wed, 16 Jun 2021 12:22:40 -0500
changeset 911
abfa73c8cfda
parent 910
272ba799a19e
child 912
a409a606c665

use pg_format

.pg_format file | annotate | diff | comparison | revisions
.vim/ftplugin/sql.vim file | annotate | diff | comparison | revisions
new file mode 100644
--- /dev/null
+++ b/.pg_format
@@ -0,0 +1,3 @@
+function-case = 2
+redshift      = 1
+wrap-comment  = 1
new file mode 100644
--- /dev/null
+++ b/.vim/ftplugin/sql.vim
@@ -0,0 +1,12 @@
+" mjibson/sqlfmt - only does cockroachdb dialect
+" this kinda sucks as far as placeholders and can't pass through odd syntax
+
+" let &l:equalprg = "sqlfmt --use-spaces --tab-width " . &shiftwidth
+" augroup SQLFMT_ERR
+"   au! * <buffer>
+"   autocmd ShellFilterPost <buffer> if v:shell_error | undo | endif
+" augroup END
+
+" cpanm https://github.com/darold/pgFormatter.git
+let &l:equalprg = "pg_format -"
+

mercurial