Add lang/plantuml
This commit is contained in:
parent
be4eeac705
commit
9a74124ede
5 changed files with 47 additions and 0 deletions
|
@ -558,6 +558,18 @@ you came from."
|
||||||
(advice-add #'xref-goto-xref :around #'doom*xref-follow-and-close))
|
(advice-add #'xref-goto-xref :around #'doom*xref-follow-and-close))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Major modes
|
||||||
|
;;
|
||||||
|
|
||||||
|
(after! plantuml-mode
|
||||||
|
(defun doom*plantuml-preview-in-popup-window (orig-fn &rest args)
|
||||||
|
(save-window-excursion
|
||||||
|
(apply orig-fn args))
|
||||||
|
(pop-to-buffer plantuml-preview-buffer))
|
||||||
|
(advice-add #'plantuml-preview-string
|
||||||
|
:around #'doom*plantuml-preview-in-popup-window))
|
||||||
|
|
||||||
;; Ensure these settings are attached to org-load-hook as late as possible,
|
;; Ensure these settings are attached to org-load-hook as late as possible,
|
||||||
;; giving other modules a chance to add their own hooks.
|
;; giving other modules a chance to add their own hooks.
|
||||||
(defun doom|init-org-popups ()
|
(defun doom|init-org-popups ()
|
||||||
|
|
|
@ -93,6 +93,7 @@
|
||||||
ocaml ; an objective camel
|
ocaml ; an objective camel
|
||||||
perl ; write code no one else can comprehend
|
perl ; write code no one else can comprehend
|
||||||
php ; make php less awful to work with
|
php ; make php less awful to work with
|
||||||
|
plantuml ; diagrams for confusing people more
|
||||||
purescript ; javascript, but functional
|
purescript ; javascript, but functional
|
||||||
python ; beautiful is better than ugly
|
python ; beautiful is better than ugly
|
||||||
rest ; Emacs as a REST client
|
rest ; Emacs as a REST client
|
||||||
|
|
10
modules/lang/plantuml/autoload.el
Normal file
10
modules/lang/plantuml/autoload.el
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
;;; lang/plantuml/autoload.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +plantuml/install ()
|
||||||
|
"Install plantuml.jar."
|
||||||
|
(interactive)
|
||||||
|
(unless (file-exists-p plantuml-jar-path)
|
||||||
|
(user-error "plantuml.jar already installed"))
|
||||||
|
(url-copy-file "https://kent.dl.sourceforge.net/project/plantuml/plantuml.jar"
|
||||||
|
plantuml-jar-path))
|
18
modules/lang/plantuml/config.el
Normal file
18
modules/lang/plantuml/config.el
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
;;; lang/plantuml/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(def-package! plantuml-mode
|
||||||
|
:mode "\\.p\\(lant\\)?uml$"
|
||||||
|
:config
|
||||||
|
(setq plantuml-jar-path (concat doom-etc-dir "plantuml.jar"))
|
||||||
|
(set! :popup "*PLANTUML Preview*" :size 25 :noselect t :autokill t)
|
||||||
|
|
||||||
|
(unless (executable-find "java")
|
||||||
|
(warn "plantuml-mode: can't find java, preview disabled."))
|
||||||
|
(unless (file-exists-p plantuml-jar-path)
|
||||||
|
(warn "plantuml-mode: can't find plantuml.jar; run M-x +plantuml/install.")))
|
||||||
|
|
||||||
|
|
||||||
|
(def-package! flycheck-plantuml
|
||||||
|
:when (featurep! :feature syntax-checker)
|
||||||
|
:after plantuml-mode
|
||||||
|
:config (flycheck-plantuml-setup))
|
6
modules/lang/plantuml/packages.el
Normal file
6
modules/lang/plantuml/packages.el
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
;; -*- no-byte-compile: t; -*-
|
||||||
|
;;; lang/plantuml/packages.el
|
||||||
|
|
||||||
|
(package! plantuml-mode)
|
||||||
|
(when (featurep! :feature syntax-checker)
|
||||||
|
(package! flycheck-plantuml))
|
Loading…
Add table
Add a link
Reference in a new issue