diff options
author | David Morgan <djm_uk@protonmail.com> | 2021-05-26 10:06:56 +0000 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2021-05-26 10:06:56 +0000 |
commit | b5e8c2052c43e9865aad35380ff0b36cabae19d2 (patch) | |
tree | 64df1a2604066e1f5d3c0c2fc6a01ce85090d17b /emacs-prelude/personal/lisp/init-paredit.el | |
parent | ccfeb564b6507fdf9b202527f90e6d11d50350eb (diff) | |
download | dotfiles-b5e8c2052c43e9865aad35380ff0b36cabae19d2.tar.gz |
Add emacs prelude config
Diffstat (limited to 'emacs-prelude/personal/lisp/init-paredit.el')
-rw-r--r-- | emacs-prelude/personal/lisp/init-paredit.el | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/emacs-prelude/personal/lisp/init-paredit.el b/emacs-prelude/personal/lisp/init-paredit.el new file mode 100644 index 0000000..6eb20d8 --- /dev/null +++ b/emacs-prelude/personal/lisp/init-paredit.el @@ -0,0 +1,27 @@ +(defun add-hooks (modes func) + (dolist (mode modes) + (add-hook (intern (concat (symbol-name mode) "-hook")) func))) + +(setq lisp-modes + '(scheme-mode emacs-lisp-mode lisp-mode clojure-mode cider-repl-mode + eval-expression-minibuffer-setup ielm-mode lisp-interaction-mode)) + +(defun add-lisp-hook (func) + (add-hooks lisp-modes func)) + +(prelude-require-package 'paredit) +(use-package paredit + :diminish + :bind (([remap mark-sexp] . sp-mark-sexp) ;; sp does this better! + ("M-[" . paredit-wrap-square)) + :config + (add-lisp-hook #'turn-off-smartparens-mode) + (add-lisp-hook #'enable-paredit-mode)) + +(use-package paredit-functions + :after paredit + :ensure nil + :load-path "~/.emacs.d/personal/lisp/paredit-functions.el") + +(provide 'init-paredit) + |