Remove yasnippet

This commit is contained in:
Dimitri Lozeve 2024-01-22 13:41:59 +01:00
parent 4af4711913
commit af1d1db048

23
init.el
View file

@ -643,29 +643,6 @@
:straight t :straight t
:after magit) :after magit)
(use-package yasnippet
:straight t
:diminish yas-minor-mode
:init
(use-package yasnippet-snippets :straight t :after yasnippet)
:hook ((prog-mode LaTeX-mode org-mode) . yas-minor-mode)
:bind
(:map yas-minor-mode-map ("C-c C-n" . yas-expand-from-trigger-key))
(:map yas-keymap
(("TAB" . smarter-yas-expand-next-field)
([(tab)] . smarter-yas-expand-next-field)))
:config
(yas-reload-all)
(defun smarter-yas-expand-next-field ()
"Try to `yas-expand' then `yas-next-field' at current cursor position."
(interactive)
(let ((old-point (point))
(old-tick (buffer-chars-modified-tick)))
(yas-expand)
(when (and (eq old-point (point))
(eq old-tick (buffer-chars-modified-tick)))
(ignore-errors (yas-next-field))))))
(use-package eglot (use-package eglot
:straight nil :straight nil
:config :config