[oni-yasnippet] Change the default expand condition
By default I don’t want any snippets to be expanded in either strings or comments.
This commit is contained in:
parent
bede6c21cf
commit
f6938f85c7
1 changed files with 3 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2021.0715.212830
|
;; Version: 2021.0919.235328
|
||||||
;; Package-Requires: (yasnippet yasnippet-snippets diminish)
|
;; Package-Requires: (yasnippet yasnippet-snippets diminish)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; 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))
|
(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 "<tab>") nil)
|
||||||
(define-key yas-minor-mode-map (kbd "C-\\") 'yas-expand)
|
(define-key yas-minor-mode-map (kbd "C-\\") 'yas-expand)
|
||||||
(define-key yas-minor-mode-map (kbd "SPC") yas-maybe-expand)
|
(define-key yas-minor-mode-map (kbd "SPC") yas-maybe-expand)
|
||||||
|
|
Loading…
Reference in a new issue