Files
creature/lisp/init-plantuml.el
zedhugh b5d9ce18a7 use "creature/pkg-active" manage packages manually
- replace "add-pkg-in-pkg-dir" (recursive load-path scanning) with a
  central "creature/pkgs" registry that handles load path, autoloads,
  info dirs and dependencies
- adapt all init-*.el files to the new activation function
- add a top-level Makefile to byte-compile site-lisp packages
- remove unused "emacs-kv" and "emacs-db" submodules
2026-09-14 15:02:43 +08:00

33 lines
1.0 KiB
EmacsLisp

;; -*- coding: utf-8; lexical-binding: t; -*-
(require 'init-package)
(creature/pkg-active 'plantuml-mode)
(autoload 'plantuml-mode "plantuml-mode" "" t)
(add-to-list 'auto-mode-alist '("\\.\\(plantuml\\|pum\\|plu\\)\\'" . plantuml-mode))
(defun plantuml-completion-at-point ()
"Function used for `completion-at-point-functions' in `plantuml-mode'.
Copy from https://github.com/skuro/plantuml-mode/issues/98."
(let ((completion-ignore-case t)
(bounds (bounds-of-thing-at-point 'symbol))
(keywords plantuml-kwdList))
(when (and bounds keywords)
(list (car bounds)
(cdr bounds)
keywords
:exclusive 'no
:company-docsig #'identity))))
(with-eval-after-load 'plantuml-mode
(setq plantuml-exec-mode 'executable
plantuml-default-exec-mode 'executable)
(add-hook 'plantuml-mode-hook
(lambda ()
(add-hook 'completion-at-point-functions
#'plantuml-completion-at-point nil 'local))))
(provide 'init-plantuml)