2016-01-25 10:06:16 +00:00
|
|
|
;;; packages.el --- plantuml layer packages file for Spacemacs.
|
|
|
|
;;
|
2021-03-22 20:11:29 +00:00
|
|
|
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
|
2016-01-25 10:06:16 +00:00
|
|
|
;;
|
|
|
|
;; Author: Robert O'Connor <robby.oconnor@gmail.com>
|
2016-10-16 15:36:58 +00:00
|
|
|
;; Contributor: Carlo Sciolla <carlo.sciolla@gmail.com>
|
2016-01-25 10:06:16 +00:00
|
|
|
;; URL: https://github.com/robbyoconnor
|
|
|
|
;;
|
2016-10-16 15:36:58 +00:00
|
|
|
;;; Commentary:
|
|
|
|
;;
|
|
|
|
;; Adds PlantUML support to Spacemacs using plantuml-mode.
|
2016-01-25 10:06:16 +00:00
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
2021-03-24 03:31:44 +00:00
|
|
|
;; This program is free software; you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
|
|
|
;;
|
|
|
|
;; This program is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
;;
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2016-01-25 10:06:16 +00:00
|
|
|
|
2016-10-16 15:36:58 +00:00
|
|
|
;;; Code:
|
2016-03-23 14:28:43 +00:00
|
|
|
(defconst plantuml-packages
|
2018-11-20 19:55:37 +00:00
|
|
|
'(
|
|
|
|
org
|
|
|
|
plantuml-mode
|
|
|
|
))
|
2016-01-25 10:06:16 +00:00
|
|
|
|
2017-08-28 17:34:15 +00:00
|
|
|
(defun plantuml/pre-init-org ()
|
2016-03-23 14:28:43 +00:00
|
|
|
(spacemacs|use-package-add-hook org
|
|
|
|
:post-config (add-to-list 'org-babel-load-languages '(plantuml . t))))
|
2016-01-25 10:06:16 +00:00
|
|
|
|
2016-10-16 15:36:58 +00:00
|
|
|
(defun plantuml/init-plantuml-mode ()
|
|
|
|
(use-package plantuml-mode
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2018-11-12 14:18:52 +00:00
|
|
|
:mode ("\\.\\(pum\\|puml\\)\\'" . plantuml-mode)
|
2018-11-12 14:22:55 +00:00
|
|
|
:config
|
|
|
|
(progn
|
2020-05-16 10:31:28 +00:00
|
|
|
;; Our default is jar execution, not server as server is not working reliable see #13574
|
|
|
|
(setq plantuml-default-exec-mode 'jar)
|
2018-11-12 14:22:55 +00:00
|
|
|
(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")
|
2018-11-12 14:22:55 +00:00
|
|
|
(spacemacs/set-leader-keys-for-major-mode 'plantuml-mode
|
|
|
|
"cc" 'plantuml-preview
|
|
|
|
"co" 'plantuml-set-output-type))))
|