Emacs: Fix YASnippet expansion in insert mode

This commit is contained in:
Riyyi
2023-12-08 23:30:45 +01:00
parent 5e7058563f
commit 50d8e3f455
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -463,7 +463,7 @@
;;; YASnippet ;;; YASnippet
(elpaca-setup yasnippet (elpaca-setup yasnippet
(:autoload yas-insert-snippet) (:autoload yas-expand yas-insert-snippet)
(setq yas-snippet-dirs (list (expand-file-name "snippets" dot-emacs-dir))) (setq yas-snippet-dirs (list (expand-file-name "snippets" dot-emacs-dir)))
(setq yas-prompt-functions '(yas-completing-prompt)) (setq yas-prompt-functions '(yas-completing-prompt))
(:when-loaded (:when-loaded
+3 -1
View File
@@ -59,7 +59,9 @@ Vim equivalence: <C-D>"
"Shift line right, retains cursor position. "Shift line right, retains cursor position.
Vim equivalence: <Tab>" Vim equivalence: <Tab>"
(interactive) (interactive)
(insert "\t")) (when (not (yas-expand))
(insert "\t")))
(defun dot/evil-visual-shift-left () (defun dot/evil-visual-shift-left ()
"Shift visual selection left, retains the selection. "Shift visual selection left, retains the selection.