[Emacs] Better graphviz configuration
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Lucien Cartier-Tilet 2021-11-27 19:30:09 +01:00
parent 84bd24efe5
commit bd12a71a92
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -4903,6 +4903,7 @@ visual graphs and networks.
(use-package graphviz-dot-mode (use-package graphviz-dot-mode
:defer t :defer t
:straight (:build t) :straight (:build t)
:after ob
:mode (("\\.diag\\'" . graphviz-dot-mode) :mode (("\\.diag\\'" . graphviz-dot-mode)
("\\.blockdiag\\'" . graphviz-dot-mode) ("\\.blockdiag\\'" . graphviz-dot-mode)
("\\.nwdiag\\'" . graphviz-dot-mode) ("\\.nwdiag\\'" . graphviz-dot-mode)
@ -4911,12 +4912,14 @@ visual graphs and networks.
("\\.gv\\'" . graphviz-dot-mode)) ("\\.gv\\'" . graphviz-dot-mode))
:init :init
(setq graphviz-dot-indent-width tab-width) (setq graphviz-dot-indent-width tab-width)
(after! org-src (after! ob
;; (defalias 'org-babel-execute:graphviz-dot #'org-babel-execute:dot) (defalias 'org-babel-execute:graphviz-dot #'org-babel-execute:dot)
(add-to-list 'org-babel-load-languages '(dot . t)) (add-to-list 'org-babel-load-languages '(dot . t))
(require 'ob-dot)
(setq org-src-lang-modes (setq org-src-lang-modes
(append '(("dot" . graphviz-dot)) (append '(("dot" . graphviz-dot))
(delete '("dot" . fundamental) org-src-lang-modes)))) (delete '("dot" . fundamental) org-src-lang-modes))))
:general :general
(phundrak/major-leader-key (phundrak/major-leader-key
:keymaps 'graphviz-dot-mode-map :keymaps 'graphviz-dot-mode-map