Tweak electric-operator-mode', smartparens', and `yasnippet' setup

This commit is contained in:
Gerard Vermeulen 2024-03-03 14:53:25 +01:00
parent 9ce77fb55e
commit e648c73c87

View File

@ -6769,6 +6769,7 @@ contrary to for instance [[https://github.com/Fanael/rainbow-delimiters#readme][
(dolist (symbol '(emacs-lisp-mode-hook (dolist (symbol '(emacs-lisp-mode-hook
go-ts-mode-hook go-ts-mode-hook
ielm-mode-hook ielm-mode-hook
inferior-python-mode-hook
lisp-data-mode-hook lisp-data-mode-hook
lisp-mode-hook lisp-mode-hook
python-mode-hook python-mode-hook
@ -6850,8 +6851,8 @@ formatter for Python]].
#+begin_src emacs-lisp -n :results silent #+begin_src emacs-lisp -n :results silent
(when (and (ensure-package-installation 'electric-operator) (when (and (ensure-package-installation 'electric-operator)
(fboundp 'electric-operator-mode)) (fboundp 'electric-operator-mode))
(add-hook 'c-mode-common-hook #'electric-operator-mode) (dolist (symbol '(c-mode-common-hook julia-mode-hook python-mode-hook))
(add-hook 'python-mode-hook #'electric-operator-mode)) (add-hook symbol #'electric-operator-mode)))
#+end_src #+end_src
** [[https://joaotavora.github.io/yasnippet/][Smart snippets]] ** [[https://joaotavora.github.io/yasnippet/][Smart snippets]]
@ -6866,11 +6867,11 @@ formatter for Python]].
(when (ensure-package-installation 'yasnippet) (when (ensure-package-installation 'yasnippet)
;; Set `yas-alias-to-yas/prefix-p' before loading `yasnippet'. ;; Set `yas-alias-to-yas/prefix-p' before loading `yasnippet'.
(setopt yas-alias-to-yas/prefix-p nil) (setopt yas-alias-to-yas/prefix-p nil)
(dolist (hook '(LaTeX-mode-hook (dolist (symbol '(LaTeX-mode-hook
org-mode-hook org-mode-hook
python-mode-hook python-mode-hook
python-ts-mode-hook)) python-ts-mode-hook))
(add-hook hook #'yas-minor-mode))) (add-hook symbol #'yas-minor-mode)))
#+end_src #+end_src
** [[info:autotype#Tempo][Tempo (info)]] :noexport: ** [[info:autotype#Tempo][Tempo (info)]] :noexport: