aboutsummaryrefslogtreecommitdiff
path: root/bard-emacs-modules
diff options
context:
space:
mode:
Diffstat (limited to 'bard-emacs-modules')
-rw-r--r--bard-emacs-modules/bard-emacs-writing.el34
1 files changed, 9 insertions, 25 deletions
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