Add d2 to emacs.

This commit is contained in:
Tom Alexander 2025-09-02 21:53:52 -04:00
parent edfafd1017
commit a6a50d7c22
No known key found for this signature in database
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,16 @@
(defun d2-format-buffer ()
"Run prettier."
(interactive)
(run-command-on-buffer "d2" "fmt" "-")
)
(use-package d2-mode
:commands (d2-mode)
:hook (
(d2-mode . (lambda ()
;; (add-hook 'before-save-hook 'd2-format-buffer nil 'local)
))
)
)
(provide 'lang-d2)

View File

@ -40,4 +40,6 @@
(require 'lang-cmake)
(require 'lang-d2)
(load-directory autoload-directory)