This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+lang/plantuml
syl20bnr ebe4c60264 Revert "Defer packages by default using use-package-always-defer"
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.

The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
2018-03-03 23:40:10 -05:00
..
img Add plantuml layer 2016-02-01 00:07:54 -05:00
packages.el Revert "Defer packages by default using use-package-always-defer" 2018-03-03 23:40:10 -05:00
README.org Fix doc for graphviz, deft and finance layer 2018-02-04 06:21:44 +02:00

plantuml layer

/TakeV/spacemacs/media/commit/572d4388fb41e6f5be24f3d21334d43c21c30f31/layers/+lang/plantuml/img/logo.png

Description

This layer enables support for plantuml-mode, which provides a major-mode for plantuml. PlantUML is a tool to generate UML diagrams from plain-text.

For help with how to use plantuml, see the plantuml website and the reference guide.

The official file extension supported by this layer is .pum. If you want something else, set it in your user-config function of your ~/.spacemacs file.

For example, the following diagram can be defined as follows:

@startuml
JAremko->robbyoconnor : I think the docs can benefit from some kind of illustration
JAremko<-robbyoconnor : I'm too lazy -- I have actual work to do. I link to the docs. If you can write me a diagram in plantuml, I'll gladly compile and add it.
JAremko->robbyoconnor : *gives ths diagram*
robbyoconnor<-JAremko : *robbyoconnor adds it and JAremko is happy*
...
robbyoconnor->theOtherPerson : And they thinks it's funny? Yup, they definitely finds it funny. Right?
@enduml

/TakeV/spacemacs/media/commit/572d4388fb41e6f5be24f3d21334d43c21c30f31/layers/+lang/plantuml/img/dia.png

Features:

  • Syntax highlighting
  • Diagram preview in various output formats
  • Embedding into org documents
  • Controlling the Plantuml compiler directly from emacs

Install

To use this contribution add it to your ~/.spacemacs

  (setq-default dotspacemacs-configuration-layers '(plantuml))

To control the Plantuml compiler you also need to download the Plantuml jar and configure the plantuml-jar-path respectively:

  (setq-default dotspacemacs-configuration-layers '((plantuml :variables plantuml-jar-path "~/plantUml.jar")))

To get the full range of Plantuml compilations working, you will also need the native package graphviz installed on your system.

Org-Babel Integration

To enable the execution of embedded plantuml code blocks within Org-Mode documents, define a value for org-plantuml-jar-path in your ~/.spacemacs:

  (setq-default dotspacemacs-configuration-layers '((plantuml :variables org-plantuml-jar-path "~/plantUml.jar")))

Key bindings

Key Binding Description
SPC m c c or C-c C-c Build diagram from the text in the current buffer
SPC m c o Set the output type (unicode text, svg, or png)