diff --git a/format-all.el b/format-all.el index 1e4e06d4..6cfa1d6d 100644 --- a/format-all.el +++ b/format-all.el @@ -59,6 +59,7 @@ ;; - Terraform (terraform fmt) ;; - TypeScript/TSX (prettier) ;; - YAML (yq) +;; - Nginx (crossplane) ;; ;; You will need to install external programs to do the formatting. ;; If `format-all-buffer` can't find the right program, it will try to @@ -623,6 +624,15 @@ Consult the existing formatters for examples of BODY." (:modes yaml-mode) (:format (format-all--buffer-easy executable "read" "-"))) +(define-format-all-formatter crossplane + (:executable "crossplane") + (:install (macos "pip install crossplane")) + (:modes nginx-mode) + (:format (format-all--buffer-easy executable "format" + (when (buffer-file-name) + (buffer-file-name)) + ))) + (defun format-all--please-install (executable installer) "Internal helper function for error about missing EXECUTABLE and INSTALLER." (concat (format "You need the %S command." executable)