Disable apheleia auto-format in awk buffers

This commit is contained in:
Alexander Rosenberg 2025-02-06 17:05:01 -08:00
parent fd942c275f
commit 9a6a9fcbf8
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -1394,13 +1394,18 @@ With PROJECT, give diagnostics for all buffers in the current project."
:bind ("C-c o" . apheleia-format-buffer)
:init
(add-to-list 'auto-mode-alist `(,(rx "/.clang-format" eos) . yaml-ts-mode))
(defun my/apheleia-disable-in-current-buffer ()
(setq-local apheleia-inhibit t))
:config
(with-eval-after-load 'apheleia
(setf (alist-get 'java-mode apheleia-mode-alist) 'clang-format
(alist-get 'java-ts-mode apheleia-mode-alist) 'clang-format
(alist-get 'awk-mode apheleia-mode-alist nil t) nil))
(alist-get 'java-ts-mode apheleia-mode-alist) 'clang-format))
(apheleia-global-mode +1))
;; awk
(with-eval-after-load 'cc-mode
(add-hook 'awk-mode-hook #'my/apheleia-disable-in-current-buffer))
;; gud
(use-package gud
:demand t