Properly set up yasnippet
This commit is contained in:
parent
2c41835d97
commit
98e55e75a0
28
init.el
28
init.el
|
@ -168,18 +168,19 @@
|
|||
("C-c p z" . puni-squeeze))
|
||||
:config
|
||||
(with-eval-after-load 'goggles
|
||||
(defun my--disable-goggles-for-puni (oldfun &rest r)
|
||||
(let ((old-goggles-mode goggles-mode))
|
||||
(goggles-mode 0)
|
||||
(let ((ret (apply oldfun r)))
|
||||
(when old-goggles-mode
|
||||
(goggles-mode))
|
||||
ret)))
|
||||
(dolist (fun '(puni-slurp-forward
|
||||
puni-barf-forward
|
||||
puni-slurp-backward
|
||||
puni-barf-backward
|
||||
puni-raise))
|
||||
(advice-add fun :around (lambda (oldfun &rest r)
|
||||
(let ((old-goggles-mode goggles-mode))
|
||||
(goggles-mode 0)
|
||||
(let ((ret (apply oldfun r)))
|
||||
(when old-goggles-mode
|
||||
(goggles-mode))
|
||||
ret)))))))
|
||||
(advice-add fun :around #'my--disable-goggles-for-puni))))
|
||||
|
||||
(use-package ace-window
|
||||
:bind ("C-c w" . ace-window)
|
||||
|
@ -281,6 +282,12 @@
|
|||
|
||||
(use-package dap-mode)
|
||||
|
||||
(use-package yasnippet
|
||||
:config
|
||||
(yas-global-mode))
|
||||
|
||||
(use-package yasnippet-snippets)
|
||||
|
||||
(use-package consult
|
||||
:bind (("M-s r" . consult-ripgrep)
|
||||
("M-s d" . consult-find)
|
||||
|
@ -288,6 +295,10 @@
|
|||
("C-x b" . consult-buffer)
|
||||
("C-x r b" . consult-bookmark)))
|
||||
|
||||
(use-package consult-yasnippet
|
||||
:bind (("C-c s" . consult-yasnippet)
|
||||
("C-c S" . consult-yasnippet-visit-snippet-file)))
|
||||
|
||||
(use-package embark
|
||||
:bind (("C-." . embark-act)
|
||||
("C-;" . embark-dwim)))
|
||||
|
@ -335,9 +346,6 @@
|
|||
|
||||
(use-package cape)
|
||||
|
||||
(use-package yasnippet)
|
||||
(use-package yasnippet-snippets)
|
||||
|
||||
(use-package all-the-icons
|
||||
:demand t)
|
||||
|
||||
|
|
Loading…
Reference in a new issue