Skip to content

Commit

Permalink
tweak(apheleia): add formatters for SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Nov 19, 2023
1 parent efee175 commit c6ceef0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion modules/me-prog.el
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,17 @@
:init
(+map! "cff" #'apheleia-format-buffer)
:config
(push '(sh-mode . shfmt) apheleia-mode-alist))
(setq apheleia-mode-alist
(append apheleia-mode-alist
'((sh-mode . shfmt)
(sql-mode . pgformatter))))
(setq apheleia-formatters
(append apheleia-formatters
'(
(sqlformat . ("sqlformat" "--keywords" "upper" "-"))
(pgformatter . ("pg_format"
(apheleia-formatters-indent "--tabs" "--spaces" 'tab-width)
(apheleia-formatters-fill-column "--wrap-limit")))))))

(use-package editorconfig
:straight t
Expand Down

0 comments on commit c6ceef0

Please sign in to comment.