I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.8 KiB

  1. #+TITLE: UML
  2. #+AUTHOR: Christopher James Hayward
  3. #+EMAIL: chris@chrishayward.xyz
  4. #+PROPERTY: header-args:emacs-lisp :tangle uml.el :comments org
  5. #+PROPERTY: header-args:shell :tangle no
  6. #+PROPERTY: header-args :results silent :eval no-export :comments org
  7. #+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil
  8. #+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
  9. Draw UML[fn:1] diagrams inside Emacs.
  10. * Setup
  11. Make sure all of the required components are installed on your system before loading the module.
  12. #+begin_src shell
  13. RUN apt install -y default-jre
  14. #+end_src
  15. * Config
  16. Download and install ~PlantUML~[fn:2], a text-based markup language for creating UML[fn:1] diagrams. You can read my notes about using the software here[fn:3]. Support for Emacs is added through the ~plantuml-mode~[fn:4] package. Configure the ~babel~ language module and structure templates to write diagrams in ~org-mode~ buffers.
  17. #+begin_src emacs-lisp
  18. (use-package plantuml-mode
  19. :after org
  20. :custom (plantuml-default-exec-mode 'jar)
  21. (plantuml-jar-path "~/.local/bin/plantuml.jar")
  22. (org-plantuml-jar-path (expand-file-name "~/.local/bin/plantuml.jar"))
  23. (org-startup-with-inline-images t)
  24. :config (add-to-list 'org-src-lang-modes '("plantuml" . plantuml))
  25. (add-to-list 'org-structure-template-alist '("pl" . "src plantuml"))
  26. (org-babel-do-load-languages 'org-babel-load-languages '((plantuml . t))))
  27. #+end_src
  28. * Shortcuts
  29. Toggle inline imagines with =SPC t i=.
  30. #+begin_src emacs-lisp
  31. (dotfiles/leader
  32. "ti" '(org-toggle-inline-images :which-key "Images"))
  33. #+end_src
  34. * Footnotes
  35. [fn:1] https://tutorialspoint.com/uml/uml_standard_diagrams.htm
  36. [fn:2] https://plantuml.com
  37. [fn:3] https://chrishayward.xyz/notes/plantuml/
  38. [fn:4] https://github.com/skuro/plantuml-mode