Skip to content

Commit

Permalink
tweak(tempel): restrict org/markdown to tempel capf
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Apr 29, 2023
1 parent be458ac commit 439b6aa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions modules/me-editor.el
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
;; 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-complete
completion-at-point-functions)))
(global-tempel-abbrev-mode))
(setq-local
completion-at-point-functions
(if (derived-mode-p 'org-mode 'markdown-mode)
'(tempel-complete
(cons #'tempel-complete completion-at-point-functions)))))
(global-tempel-abbrev-mode 1))

(use-package tempel-collection
:straight t
Expand Down

0 comments on commit 439b6aa

Please sign in to comment.