Fix yasnippet and or conflict
This commit is contained in:
parent
a27d68b18c
commit
466de21365
1 changed files with 11 additions and 0 deletions
|
@ -58,6 +58,17 @@
|
||||||
|
|
||||||
;; Snippets
|
;; Snippets
|
||||||
(use-package yasnippet
|
(use-package yasnippet
|
||||||
|
:init
|
||||||
|
;; See https://orgmode.org/org.html#index-yasnippet_002eel
|
||||||
|
(defun yas/org-very-safe-expand () (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))
|
||||||
|
(defun chvp/yas-org-fix () (
|
||||||
|
(make-variable-buffer-local 'yas/trigger-key)
|
||||||
|
(setq yas/trigger-key [tab])
|
||||||
|
(add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
|
||||||
|
(define-key yas/keymap [tab] 'yas/next-field)
|
||||||
|
))
|
||||||
|
:hook
|
||||||
|
(org-mode . chvp/yas-org-fix)
|
||||||
;; This is not very nice, but let's just assume that development machines have my nixos-config checked out
|
;; This is not very nice, but let's just assume that development machines have my nixos-config checked out
|
||||||
:custom (yas-snippet-dirs '("/home/charlotte/repos/nixos-config/modules/development/snippets/"))
|
:custom (yas-snippet-dirs '("/home/charlotte/repos/nixos-config/modules/development/snippets/"))
|
||||||
:diminish (yas-minor-mode)
|
:diminish (yas-minor-mode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue