summary refs log tree commit diff
path: root/.dir-locals.el
diff options
context:
space:
mode:
authorAndrew Tropin <andrew@trop.in>2022-08-03 17:51:48 +0300
committerAndrew Tropin <andrew@trop.in>2022-09-05 09:10:05 +0300
commit956a79b9b2ba555bf41aafe0c44b9a68a8d6c37a (patch)
tree8f3f18467c2ecaf50ee83412982d36a13dccf213 /.dir-locals.el
parentd22a5c18517d662516fc93889534367fd3a448f2 (diff)
downloadguix-956a79b9b2ba555bf41aafe0c44b9a68a8d6c37a.tar.gz
.dir-locals.el: Add guix yasnippets.
* .dir-locals.el (eval): Add guix yasnippets.
Diffstat (limited to '.dir-locals.el')
-rw-r--r--.dir-locals.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
index e4c1da8026..6fa0ec8bc6 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -14,6 +14,17 @@
      (eval . (setq-local guix-directory
                          (locate-dominating-file default-directory
                                                  ".dir-locals.el")))
+     ;; YASnippet
+     (eval . (with-eval-after-load
+                 'yasnippet
+               (let ((guix-yasnippets
+                      (expand-file-name
+                       "etc/snippets"
+                       (locate-dominating-file default-directory
+                                               ".dir-locals.el"))))
+                 (unless (member guix-yasnippets yas-snippet-dirs)
+                   (add-to-list 'yas-snippet-dirs guix-yasnippets)
+                   (yas-reload-all)))))
 
      ;; Geiser
      ;; This allows automatically setting the `geiser-guile-load-path'