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/packages.el

45 lines
1.4 KiB
EmacsLisp
Raw Normal View History

;;; packages.el --- plantuml layer packages file for Spacemacs.
;;
2018-01-04 07:00:25 +00:00
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
;;
;; Author: Robert O'Connor <robby.oconnor@gmail.com>
;; Contributor: Carlo Sciolla <carlo.sciolla@gmail.com>
;; URL: https://github.com/robbyoconnor
;;
;;; Commentary:
;;
;; Adds PlantUML support to Spacemacs using plantuml-mode.
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;;; Code:
(defconst plantuml-packages
'(
org
plantuml-mode
))
(defun plantuml/pre-init-org ()
(spacemacs|use-package-add-hook org
:post-config (add-to-list 'org-babel-load-languages '(plantuml . t))))
(defun plantuml/init-plantuml-mode ()
(use-package plantuml-mode
:defer t
2018-11-12 14:18:52 +00:00
:mode ("\\.\\(pum\\|puml\\)\\'" . plantuml-mode)
:config
(progn
;; Our default is jar execution, not server as server is not working reliable see #13574
(setq plantuml-default-exec-mode 'jar)
(when (boundp 'spacemacs-indent-sensitive-modes)
;; for now plantuml electric indentation is buggy and does not
;; really work, let's disable auto-indentation on paste for
;; this mode
(add-to-list 'spacemacs-indent-sensitive-modes 'plantuml-mode))
2019-05-19 18:57:06 +00:00
(spacemacs/declare-prefix-for-mode 'plantuml-mode
"mc" "compile")
(spacemacs/set-leader-keys-for-major-mode 'plantuml-mode
"cc" 'plantuml-preview
"co" 'plantuml-set-output-type))))