aboutsummaryrefslogtreecommitdiffstats
path: root/oni-yasnippet.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2021-09-19 23:53:47 -0700
committerGravatar Tom Willemse2021-09-19 23:53:47 -0700
commitf6938f85c7a1d8bd0016332fa30760afc02e7307 (patch)
tree7a4f287cff458f6c449e8ec5fe1fab5d8e144856 /oni-yasnippet.el
parentbede6c21cf26ed3da040b99694901c88987bf126 (diff)
downloademacs-config-f6938f85c7a1d8bd0016332fa30760afc02e7307.tar.gz
emacs-config-f6938f85c7a1d8bd0016332fa30760afc02e7307.zip
[oni-yasnippet] Change the default expand condition
By default I don’t want any snippets to be expanded in either strings or comments.
Diffstat (limited to 'oni-yasnippet.el')
-rw-r--r--oni-yasnippet.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/oni-yasnippet.el b/oni-yasnippet.el
index 067df61..46a9e95 100644
--- a/oni-yasnippet.el
+++ b/oni-yasnippet.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2021.0715.212830
+;; Version: 2021.0919.235328
;; Package-Requires: (yasnippet yasnippet-snippets diminish)
;; This program is free software; you can redistribute it and/or modify
@@ -36,6 +36,8 @@
(with-eval-after-load 'yasnippet (diminish 'yas-minor-mode))
+(setq-default yas-buffer-local-condition yas-not-string-or-comment-condition)
+
(define-key yas-minor-mode-map (kbd "<tab>") nil)
(define-key yas-minor-mode-map (kbd "C-\\") 'yas-expand)
(define-key yas-minor-mode-map (kbd "SPC") yas-maybe-expand)