From f6938f85c7a1d8bd0016332fa30760afc02e7307 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 19 Sep 2021 23:53:47 -0700 Subject: [PATCH] [oni-yasnippet] Change the default expand condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By default I don’t want any snippets to be expanded in either strings or comments. --- oni-yasnippet.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ;; 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 "") nil) (define-key yas-minor-mode-map (kbd "C-\\") 'yas-expand) (define-key yas-minor-mode-map (kbd "SPC") yas-maybe-expand)