summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--user/emacs/init.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 38bfc431..78e2e54e 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -888,6 +888,12 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
 (use-package astro-ts-mode
   :mode (("\\.astro\\'" . astro-ts-mode)))
 
+(define-derived-mode dnscontrol-mode typescript-ts-mode "DNSControl"
+  "Major mode for editing configuration of DNSControl."
+  (if (featurep 'apheleia)
+      (setq-local apheleia-formatter 'dnscontrol)))
+(add-to-list 'auto-mode-alist '("dnsconfig.js\\'" . dnscontrol-mode))
+
 (autoload 'ansi-color-apply-on-region "ansi-color")
 (defun colourise-compilation-buffer ()
   (ansi-color-apply-on-region compilation-filter-start (point-max)))
@@ -1321,6 +1327,7 @@ paths for the same project."
                   '("shfmt"))
             (setq apheleia-formatters
                   (append apheleia-formatters '((nixpkgs-fmt "nixpkgs-fmt")
+                                                (dnscontrol "dnscontrol" "fmt")
                                                 (golines "golines")
                                                 (taplo "taplo" "format" "-")
                                                 (prettier-gotmpl