From 12d52690d4912160577cc23733bf22644742d6c6 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Thu, 4 May 2023 20:37:02 -0400 Subject: [PATCH] apheleia: Check prettier config for all prettier variants --- .emacs.d/init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 94726bb..45dfed0 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1075,7 +1075,7 @@ (cond ((member 'black formatters) (apheleia--pyproject-contains-section "tool.black")) ((member 'djlint formatters) (apheleia--pyproject-contains-section "tool.djlint")) - ((member 'prettier formatters) + ((seq-some (lambda (f) (string-prefix-p "prettier" (symbol-name f))) formatters) (when (= 0 (call-process "prettier" nil nil nil "--find-config-path" (buffer-file-name))) (let* ((config-file (shell-command-to-string (concat "prettier --find-config-path " (buffer-file-name)))) (default-directory (file-name-directory (expand-file-name config-file)))