diff options
| author | Daniel <[email protected]> | 2024-05-06 16:27:49 -0400 |
|---|---|---|
| committer | Daniel <[email protected]> | 2024-05-06 16:27:49 -0400 |
| commit | fa7ab390525876fed9d88aa4d7f07015058033f8 (patch) | |
| tree | 5e80bad46d6484b831960790905ac258ffd6df37 | |
| parent | 93a65977f44879ed6939da7d5cfe39aa8e8e3157 (diff) | |
snippets and denote menu
| -rw-r--r-- | bard-emacs-modules/bard-emacs-writing.el | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/bard-emacs-modules/bard-emacs-writing.el b/bard-emacs-modules/bard-emacs-writing.el index 649e7e2..9666506 100644 --- a/bard-emacs-modules/bard-emacs-writing.el +++ b/bard-emacs-modules/bard-emacs-writing.el @@ -30,11 +30,40 @@ (setq show-paren-when-point-inside-paren nil) (setq show-paren-context-when-offscreen 'overlay)) -;;; Altcaps +;; Altcaps (use-package altcaps :config (define-key global-map (kbd "C-x C-a") #'altcaps-dwim)) +;; snippets + +(use-package tempel + ;; Require trigger prefix before template name when completing. + :bind (("M-+" . tempel-complete) ;; Alternative tempel-expand + ("M-*" . 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))) + + (add-hook 'conf-mode-hook 'tempel-setup-capf) + (add-hook 'prog-mode-hook 'tempel-setup-capf) + (add-hook 'text-mode-hook 'tempel-setup-capf) + :config + (setq tempel-path "~/.emacs.d/tempel-snippets.el")) + +;;; Notes (use-package denote :config (setq denote-directory "~/Notes/denote/") @@ -76,6 +105,8 @@ (use-package denote-explore) +(use-package denote-menu) + ;;; Hyperbole for hyper linking (use-package hyperbole) |
