diff --git a/layers/+lang/plantuml/README.org b/layers/+lang/plantuml/README.org new file mode 100644 index 000000000..61735ecb4 --- /dev/null +++ b/layers/+lang/plantuml/README.org @@ -0,0 +1,47 @@ +#+TITLE: plantuml layer +#+HTML_HEAD_EXTRA: +[[file:img/logo.png]] +* Table of Contents :TOC_4_org:noexport: + - [[Description][Description]] + - [[Install][Install]] + - [[Key bindings][Key bindings]] + +* Description +This layer enables support for [[https://github.com/skuro/puml-mode][puml-mode]], which provides +a major-mode for [[http://plantuml.com][plantuml]]. PlantUML is a tool to generate [[https://en.wikipedia.org/wiki/Unified_Modeling_Language][UML diagrams]] from plain-text. + +For help with how to use plantuml, see the [[http://plantuml.com][plantuml website]] and the [[http://plantuml.com/PlantUML_Language_Reference_Guide.pdf][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: + +#+BEGIN_SRC plantuml +@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 +#+END_SRC + +[[file:img/dia.png]] + + + +* Install +To use this contribution add it to your =~/.spacemacs= + +#+begin_src emacs-lisp + (setq-default dotspacemacs-configuration-layers '(plantuml)) +#+end_src + +* 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~) | diff --git a/layers/+lang/plantuml/img/dia.png b/layers/+lang/plantuml/img/dia.png new file mode 100644 index 000000000..c1a8e70b3 Binary files /dev/null and b/layers/+lang/plantuml/img/dia.png differ diff --git a/layers/+lang/plantuml/img/logo.png b/layers/+lang/plantuml/img/logo.png new file mode 100644 index 000000000..214b4ed6d Binary files /dev/null and b/layers/+lang/plantuml/img/logo.png differ diff --git a/layers/+lang/plantuml/packages-config.el b/layers/+lang/plantuml/packages-config.el new file mode 100644 index 000000000..29e56762a --- /dev/null +++ b/layers/+lang/plantuml/packages-config.el @@ -0,0 +1,19 @@ +;;; packages-config.el --- plantuml layer packages file for Spacemacs. +;; +;; Copyright (c) 2012-2016 Sylvain Benner & Contributors +;; +;; Author: Robert O'Connor +;; URL: https://github.com/robbyoconnor +;; +;; This file is not part of GNU Emacs. +;; +;;; License: GPLv3 + +;;; Commentary: + +;;; Code: + +(defconst plantuml-packages + '(puml-mode)) + +;;; packages-config.el ends here diff --git a/layers/+lang/plantuml/packages.el b/layers/+lang/plantuml/packages.el new file mode 100644 index 000000000..8fce8943c --- /dev/null +++ b/layers/+lang/plantuml/packages.el @@ -0,0 +1,24 @@ +;;; packages.el --- plantuml layer packages file for Spacemacs. +;; +;; Copyright (c) 2012-2016 Sylvain Benner & Contributors +;; +;; Author: Robert O'Connor +;; URL: https://github.com/robbyoconnor +;; +;; This file is not part of GNU Emacs. +;; +;;; License: GPLv3 + +;;; Commentary: + +;;; Code: + +(defun plantuml/init-puml-mode () + (use-package puml-mode + :defer t + :mode ("\\.pum$" . puml-mode) + + :config (spacemacs/set-leader-keys-for-major-mode 'puml-mode + "cc" 'puml-preview + "co" 'puml-set-output-type))) +;;; packages.el ends here