summaryrefslogtreecommitdiff
path: root/.config/emacs/init.el
diff options
context:
space:
mode:
Diffstat (limited to '.config/emacs/init.el')
-rw-r--r--.config/emacs/init.el18
1 files changed, 8 insertions, 10 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 8560128..37f315d 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -449,17 +449,15 @@ existing grammars."
;;; Snippet Support
(use-package tempel
:pin gnu
+ :custom
+ (tempel-trigger-prefix ",")
+ (tempel-path (expand-file-name "templates" x-config-directory))
:init
- (customize-set-variable
- 'tempel-path (expand-file-name "templates" x-config-directory))
- (push (cons tempel-path 'lisp-data-mode) auto-mode-alist))
-
-(use-package eglot-tempel
- :init
- (with-eval-after-load 'eglot
- (add-hook 'eglot-managed-mode-hook
- (λ (unless (default-value eglot-tempel-mode)
- (eglot-tempel-mode))))))
+ (dolist (mode '(conf-mode prog-mode text-mode))
+ (add-hook
+ (x-mode-to-hook mode)
+ (λ (add-hook 'completion-at-point-functions
+ #'tempel-complete -10 'local)))))
;;; Automatically Create Directories
(defun x-auto-create-directories (original-function filename &rest arguments)