From 7e4ae766ca7dceb3ba62022ca36180a4a5213570 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Tue, 18 Jun 2024 16:52:58 -0400 Subject: [PATCH] Added pgformatter as default formatter --- emacs/config.el | 2 ++ emacs/config.org | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/emacs/config.el b/emacs/config.el index 3c027db..cfada82 100644 --- a/emacs/config.el +++ b/emacs/config.el @@ -4,6 +4,8 @@ (setq fancy-splash-image (concat doom-user-dir "./.resources/doom.png")) +(setq-hook! 'sql-mode-hook +format-with 'pgformatter) + (setq ispell-dictionary "en" ispell-personal-dictionary "~/org/.ispell.en.pws") diff --git a/emacs/config.org b/emacs/config.org index 151108b..4320ec4 100644 --- a/emacs/config.org +++ b/emacs/config.org @@ -319,6 +319,14 @@ snippets ; my elves. They type so I don't have to ;;word-wrap ; soft wrapping with language-aware indent #+end_src +*** Custom Formatter +Doom uses [[https://github.com/lassik/emacs-format-all-the-code][emacs-format-all-the-code]] for its formatting. It's a great package, but I use different formatters for a couple language. At this time I'm only going to update =sql-mode= to use [[https://github.com/darold/pgFormatter][pgformatter]]. It's supported, but instead used by default. + +#+begin_src emacs-lisp +(setq-hook! 'sql-mode-hook +format-with 'pgformatter) +#+end_src + + ** Emacs https://github.com/doomemacs/doomemacs/tree/master/modules/emacs #+name:doom-emacs