From 7df0234a4f14dc7b7be4654a23336f01bc4dd88c Mon Sep 17 00:00:00 2001 From: Abdelhak Bougouffa Date: Sun, 10 Nov 2024 01:05:20 +0100 Subject: [PATCH] tweak(plantuml): prefer executable, correctly use the JAR file --- modules/on-demand/me-plantuml.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/on-demand/me-plantuml.el b/modules/on-demand/me-plantuml.el index 6d989b60..98f699c2 100644 --- a/modules/on-demand/me-plantuml.el +++ b/modules/on-demand/me-plantuml.el @@ -33,8 +33,12 @@ (list keyword) (all-completions sym-at-pt plantuml-kwdList))))))) - ;; Automatically download the latest version of PlantUML - (setopt plantuml-jar-path (+github-download-release "plantuml/plantuml" "plantuml-{{ver}}.jar")) + (if (executable-find "plantuml") + ;; Use the executable + (setopt plantuml-default-exec-mode 'executable) + ;; Automatically download the latest version of PlantUML + (setopt plantuml-default-exec-mode 'jar + plantuml-jar-path (+github-download-release "plantuml/plantuml" "plantuml-{{ver}}.jar"))) ;; Add support for `capf' (defun +plantuml-mode-setup ()