diff options
Diffstat (limited to 'tag-emacs')
-rw-r--r-- | tag-emacs/emacs.d/Cask | 1 | ||||
-rw-r--r-- | tag-emacs/emacs.d/init.el | 24 |
2 files changed, 23 insertions, 2 deletions
diff --git a/tag-emacs/emacs.d/Cask b/tag-emacs/emacs.d/Cask index 1a65cc3..4809547 100644 --- a/tag-emacs/emacs.d/Cask +++ b/tag-emacs/emacs.d/Cask @@ -63,6 +63,7 @@ (depends-on "org-plus-contrib") (depends-on "pallet") (depends-on "paradox") +(depends-on "paredit") (depends-on "persp-projectile") (depends-on "perspective") (depends-on "php-extras") diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 051d298..120c85b 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1057,7 +1057,26 @@ mouse-1: Display Line and Column Mode Menu")))))) :commands (eldoc-mode) :diminish eldoc-mode :config (progn - (setq eldoc-idle-delay 0.1))) + (setq eldoc-idle-delay 0.1) + (eldoc-add-command 'paredit-backward-delete 'paredit-close-round))) + +(req-package paredit + :diminish "()" + :commands (paredit-mode) + :config (progn + (defun ap/cedit-space-delimiter-p (endp delimiter) + "Don't insert a space before delimiters in c-style modes" + (not cedit-mode)) + (add-to-list 'paredit-space-for-delimiter-predicates #'ap/cedit-space-delimiter-p)) + :init (progn + (add-hook 'lisp-mode-common-hook #'enable-paredit-mode) + (put #'paredit-forward-delete 'delete-selection 'supersede) + (put #'paredit-backward-delete 'delete-selection 'supersede) + (add-hook 'minibuffer-setup-hook #'conditionally-enable-paredit-mode) + (defun conditionally-enable-paredit-mode () + "enable paredit-mode during eval-expression" + (if (eq this-command 'eval-expression) + (paredit-mode 1))))) (req-package smartparens-config :config (progn @@ -1077,7 +1096,8 @@ mouse-1: Display Line and Column Mode Menu")))))) (bind-key "C-M-S-k" #'sp-kill-hybrid-sexp sp-keymap) (bind-key "C-S-<right>" #'sp-slurp-hybrid-sexp sp-keymap) (show-smartparens-global-mode t) - (smartparens-global-strict-mode t))) + (smartparens-global-strict-mode t) + (add-hook 'lisp-mode-common-hook #'turn-off-smartparens-mode))) (req-package move-text :config (move-text-default-bindings)) |