doom-etc-dir will be renamed to doom-data-dir, to better reflect its purpose, and align it with XDG_DATA_HOME (where it will be moved to in v3, where Doom will begin to obey XDG directory conventions more closely).
29 lines
984 B
EmacsLisp
29 lines
984 B
EmacsLisp
;;; lang/plantuml/config.el -*- lexical-binding: t; -*-
|
|
|
|
(use-package! plantuml-mode
|
|
:commands plantuml-download-jar
|
|
:init
|
|
(setq plantuml-jar-path (concat doom-data-dir "plantuml.jar")
|
|
org-plantuml-jar-path plantuml-jar-path)
|
|
:config
|
|
(set-popup-rule! "^\\*PLANTUML" :size 0.4 :select nil :ttl 0)
|
|
|
|
(setq plantuml-default-exec-mode
|
|
(cond ((file-exists-p plantuml-jar-path) 'jar)
|
|
((executable-find "plantuml") 'executable)
|
|
(plantuml-default-exec-mode))))
|
|
|
|
|
|
(use-package! flycheck-plantuml
|
|
:when (modulep! :checkers syntax)
|
|
:after plantuml-mode
|
|
:config (flycheck-plantuml-setup))
|
|
|
|
|
|
(after! ob-plantuml
|
|
;; HACK Force ob-plantuml to use `plantuml-mode''s building mechanism, which
|
|
;; is more sophisticated.
|
|
(advice-add #'org-babel-execute:plantuml
|
|
:override #'+plantuml-org-babel-execute:plantuml-a)
|
|
(add-to-list 'org-babel-default-header-args:plantuml
|
|
'(:cmdline . "-charset utf-8")))
|