-
I confirm that...
What is your question?Hi, everyone.
;; ~/.config/doom/config.el
(use-package! paredit
:hook ((emacs-lisp-mode
lisp-mode
common-lisp-mode
clojure-mode
scheme-mode
lisp-interaction-mode)
. paredit-mode))
;; to ensure the scratch buffer is lisp-interaction-mode & paredit
(after! smartparens
(dolist (hook '(emacs-lisp-mode-hook
lisp-mode-hook
common-lisp-mode-hook
clojure-mode-hook
scheme-mode-hook
lisp-interaction-mode-hook))
(add-hook hook (lambda () (smartparens-mode -1)))))
(add-hook 'after-change-major-mode-hook
(lambda ()
(when (string= (buffer-name) "*scratch*")
(unless (derived-mode-p 'lisp-interaction-mode)
(lisp-interaction-mode))
(when (and (boundp 'smartparens-mode) smartparens-mode)
(smartparens-mode -1))
(paredit-mode 1))))
(when (boundp 'doom-scratch-buffer-created-hook)
(add-hook 'doom-scratch-buffer-created-hook
(lambda ()
(lisp-interaction-mode)
(smartparens-mode -1)
(paredit-mode 1))))System informationNo response |
Beta Was this translation helpful? Give feedback.
Answered by
touxstone
Mar 3, 2026
Replies: 1 comment 3 replies
-
;;; add to $DOOMDIR/config.el
;; Enable paredit where you want it
(use-package! paredit
:hook ((emacs-lisp-mode
lisp-mode
common-lisp-mode
clojure-mode
scheme-mode
lisp-interaction-mode)
. paredit-mode))
;; Change the major mode in...
;; ...Emacs' *scratch* buffer
(setq initial-major-mode 'lisp-interaction-mode)
;; ...Doom's scratch buffer
(setq doom-scratch-initial-major-mode 'lisp-interaction-mode)
;; Either disable smartparens where paredit is active:
(add-hook 'paredit-mode-hook #'turn-off-smartparens-mode)
;; OR disable smartparens globally:
(remove-hook 'doom-first-buffer-hook #'smartparens-global-mode)Side notes:
Hope that helps! |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oooops. yes, it's true. I apologize for the confusion; I was referring to the
M: RET eval (symbol-value 'paredit-mode)function. It's now working, your solutionremove-hook 'doom-first-buffer-hook #'smartparens-global-modehas been key, thanks.