summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-10-19 17:02:27 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-10-19 17:02:27 +0200
commit473e1b52323bcd14332b4ce16c88e41b91c55d51 (patch)
tree5864313e6dc08a793206c167bc36cb0db386316d /.config
parentec48adfb9198883644e269a65e80582479536fcc (diff)
emacs: Fix tempel CAPF hook
Diffstat (limited to '.config')
-rw-r--r--.config/emacs/modules/mm-abbrev.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/.config/emacs/modules/mm-abbrev.el b/.config/emacs/modules/mm-abbrev.el
index 0a34032..73ca761 100644
--- a/.config/emacs/modules/mm-abbrev.el
+++ b/.config/emacs/modules/mm-abbrev.el
@@ -78,14 +78,18 @@ function."
:ensure t
:demand t
:pin gnu
- :bind (:map tempel-map
- ("TAB" . tempel-next)
- ("S-TAB" . tempel-previous))
+ :bind ( :map tempel-map
+ ("TAB" . tempel-next)
+ ("S-TAB" . tempel-previous))
:custom
- (tempel-trigger-prefix ",")
+ (tempel-trigger-prefix "<")
:init
(setopt tempel-path (expand-file-name "templates" mm-config-directory))
- (add-hook 'completion-at-point-functions #'tempel-complete -10)
+ (dolist (mode '(conf-mode prog-mode text-mode))
+ (add-hook (mm-mode-to-hook mode)
+ (defun mm-setup-tempel-capf ()
+ (add-hook 'completion-at-point-functions
+ #'tempel-complete -10 :local))))
(add-to-list 'auto-mode-alist (cons tempel-path #'lisp-data-mode)))
(provide 'mm-abbrev)