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.
This commit is contained in:
Nikita Bloshchanevich 2023-11-14 11:35:45 +01:00 committed by Henrik Lissner
parent 7fb69fac64
commit 7d5ceff5ec

View file

@ -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