summary refs log tree commit diff
path: root/doc/contributing.texi
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2022-08-12 10:58:48 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2022-08-30 11:50:14 +0200
commitc4acaf412064568a546034871a9e0d3888aa7937 (patch)
tree5e7bded5fd11b96dc65627b54942f6da5792abf8 /doc/contributing.texi
parent6beadc82df204f315d06ea35f2e232bb32f8e440 (diff)
downloadguix-c4acaf412064568a546034871a9e0d3888aa7937.tar.gz
etc: Add tempel snippets.
* etc/snippets/tempel/scheme-mode: New file.
* etc/snippets/tempel/text-mode: New file.
* etc/snippets/scheme-mode: Moved from here...
* etc/snippets/yas/scheme-mode: ... to here.
* etc/snippets/text-mode: Moved from here...
* etc/snippets/yas/text-mode: ... to here.
* doc/contributing.texi ("The Perfect Setup"): Adjust yasnippet setup
accordingly.  Add tempel setup.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'doc/contributing.texi')
-rw-r--r--doc/contributing.texi18
1 files changed, 14 insertions, 4 deletions
diff --git a/doc/contributing.texi b/doc/contributing.texi
index 02c7c5ae59..b1d236c011 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -320,15 +320,25 @@ s-expression, etc.
 @cindex reducing boilerplate
 We also provide templates for common git commit messages and package
 definitions in the @file{etc/snippets} directory.  These templates can
-be used with @url{https://joaotavora.github.io/yasnippet/, YASnippet} to
-expand short trigger strings to interactive text snippets.  You may want
-to add the snippets directory to the @var{yas-snippet-dirs} variable in
+be used to expand short trigger strings to interactive text snippets. If
+you use @url{https://joaotavora.github.io/yasnippet/, YASnippet}, you
+may want to add the @file{etc/snippets/yas} snippets directory to the
+@var{yas-snippet-dirs} variable.  If you use
+@url{https://github.com/minad/tempel/, Tempel}, you may want to add the
+@file{etc/snippets/tempel/*} path to the @var{tempel-path} variable in
 Emacs.
 
 @lisp
 ;; @r{Assuming the Guix checkout is in ~/src/guix.}
+;; @r{Yasnippet configuration}
 (with-eval-after-load 'yasnippet
-  (add-to-list 'yas-snippet-dirs "~/src/guix/etc/snippets"))
+  (add-to-list 'yas-snippet-dirs "~/src/guix/etc/snippets/yas"))
+;; @r{Tempel configuration}
+(with-eval-after-load 'tempel
+   ;; Ensure tempel-path is a list -- it may also be a string.
+   (unless (listp 'tempel-path)
+     (setq tempel-path (list tempel-path)))
+   (add-to-list 'tempel-path "~/src/guix/etc/snippets/tempel/*"))
 @end lisp
 
 The commit message snippets depend on @url{https://magit.vc/, Magit} to