diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 2ecdb98..5f228f6 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -197,6 +197,21 @@ (add-hook 'prog-mode-hook #'(lambda () (setq-local show-trailing-whitespace t)))) +(use-package graphviz-dot-mode + :config + ; don't auto-newline on semicolon + (defun electric-graphviz-dot-semi () + "Terminate line and indent next line." + (interactive) + (insert ";") + (if (and graphviz-dot-auto-indent-on-semi + (not (graphviz-dot-comment-or-string-p))) + (save-excursion + (beginning-of-line) + (skip-chars-forward " \t") + (graphviz-dot-indent-line)) + (delete-horizontal-space)))) + ;;;; external packages (required) (use-package company :ensure :config