From dba0c0dfb2086b3872073d02c798c87ca42bae68 Mon Sep 17 00:00:00 2001 From: BardofSprites Date: Sat, 4 Oct 2025 15:13:43 -0400 Subject: change back to yasnippet --- bard-emacs-modules/bard-emacs-writing.el | 34 +++++++++----------------------- 1 file changed, 9 insertions(+), 25 deletions(-) (limited to 'bard-emacs-modules/bard-emacs-writing.el') diff --git a/bard-emacs-modules/bard-emacs-writing.el b/bard-emacs-modules/bard-emacs-writing.el index 3d9d40c..ec5ac23 100644 --- a/bard-emacs-modules/bard-emacs-writing.el +++ b/bard-emacs-modules/bard-emacs-writing.el @@ -42,34 +42,18 @@ (setq show-paren-context-when-offscreen 'overlay)) ;; snippets - -(use-package tempel +(use-package yasnippet :ensure t - :demand t - ;; Require trigger prefix before template name when completing. - :bind (("M-i" . tempel-complete) ;; Alternative tempel-expand - ("M-S-i" . tempel-insert)) - :init - - ;; Setup completion at point - (defun tempel-setup-capf () - ;; Add the Tempel Capf to `completion-at-point-functions'. - ;; `tempel-expand' only triggers on exact matches. Alternatively use - ;; `tempel-complete' if you want to see all matches, but then you - ;; should also configure `tempel-trigger-prefix', such that Tempel - ;; does not trigger too often when you don't expect it. NOTE: We add - ;; `tempel-expand' *before* the main programming mode Capf, such - ;; that it will be tried first. - (setq-local completion-at-point-functions - (cons #'tempel-expand - completion-at-point-functions))) + :config + (setq yas-snippet-dirs '("~/.emacs.d/snippets")) + (yas-global-mode t) + ) - :hook - ((conf-mode . tempel-setup-capf) - (prog-mode . tempel-setup-capf) - (text-mode . tempel-setup-capf)) +(use-package yasnippet-capf + :ensure t + :after cape :config - (setq tempel-path "~/.emacs.d/tempel-snippets.el")) + (add-to-list 'completion-at-point-functions #'yasnippet-capf)) ;;; Notes (use-package denote -- cgit v1.2.3