From 7d5ceff5ec9683b975d5a60c1a287b804ab5a4c3 Mon Sep 17 00:00:00 2001 From: Nikita Bloshchanevich Date: Tue, 14 Nov 2023 11:35:45 +0100 Subject: [PATCH] fix(plantuml): flycheck: executable support The flycheck-plantuml is by default configured to always run plantuml via "java". This only works with a downloaded plantuml. However, I would prefer to have plantuml installed via my package manager (fedora/dnf). A locally installed PlantUML executable is already detected by default for normal use (export/preview), we can also use it for flycheck. If plantuml is downloaded using plantuml-download-jar, this jar is still used by default (see setq plantuml-exec-mode), so this should not affect previous setups. --- modules/lang/plantuml/config.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/lang/plantuml/config.el b/modules/lang/plantuml/config.el index f55d45395..64ff4ed13 100644 --- a/modules/lang/plantuml/config.el +++ b/modules/lang/plantuml/config.el @@ -17,7 +17,11 @@ (use-package! flycheck-plantuml :when (modulep! :checkers syntax) :after plantuml-mode - :config (flycheck-plantuml-setup)) + :config + (flycheck-plantuml-setup) + (when (eq plantuml-default-exec-mode 'executable) + ;; Surprisingly, this works, even though flycheck-plantuml specifies -Djava.awt... + (setq-default flycheck-plantuml-executable plantuml-executable-path))) (after! ob-plantuml