Skip to content

Commit

Permalink
Handle paredit binding paredit-RET in v25+
Browse files Browse the repository at this point in the history
  • Loading branch information
sandhu committed Dec 21, 2022
1 parent 6a9746c commit cc5f7e0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
13 changes: 8 additions & 5 deletions config/111-lisp-config.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
(global-eldoc-mode -1)
(eldoc-mode -1)

(defun conditionally-enable-paredit-mode ()
"Enable 'paredit-mode' in the minibuffer, during 'eval-expression'."
(if (eq this-command 'eval-expression)
(paredit-mode 1)))

(use-package paredit :ensure t
:config (progn (defun conditionally-enable-paredit-mode ()
"Enable 'paredit-mode' in the minibuffer, during 'eval-expression'."
(if (eq this-command 'eval-expression)
(paredit-mode 1)))
(add-hook 'minibuffer-setup-hook 'conditionally-enable-paredit-mode))
:config (progn
(add-hook 'minibuffer-setup-hook 'conditionally-enable-paredit-mode)
(unbind-key (kbd "RET") paredit-mode-map))
:bind (("C-M-<backspace>" . backward-kill-sexp)
("M-[" . paredit-wrap-square))
:diminish "()")
Expand Down
2 changes: 2 additions & 0 deletions config/112-completion-config.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
(use-package company :ensure t
:init (setq company-idle-delay
(lambda () (if (company-in-string-or-comment) nil 0.2)))
:config (global-company-mode)
:diminish " α")

Expand Down
9 changes: 5 additions & 4 deletions config/114-clojure-config.el
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
:config (progn
(diminish-major-mode 'cider-repl-mode "Ç»")
(add-to-list 'same-window-buffer-names "*cider*")
(add-hook 'cider-repl-mode-hook 'lisp-mode-setup)
(add-hook 'cider-repl-mode-hook
(lambda ()
(lisp-mode-setup)
(aggressive-indent-mode 0)))
(add-hook 'cider-repl-mode-hook #'cider-company-enable-fuzzy-completion)
(add-hook 'cider-mode-hook #'cider-company-enable-fuzzy-completion))
Expand All @@ -41,7 +41,8 @@
(use-package cider-eval-sexp-fu :ensure t)

(use-package clj-refactor :ensure t
:init (add-hook 'clojure-mode-hook (lambda ()
(clj-refactor-mode 1)
(cljr-add-keybindings-with-prefix "C-c M-r")))
:init (add-hook 'clojure-mode-hook
(lambda ()
(clj-refactor-mode 1)
(cljr-add-keybindings-with-prefix "C-c M-r")))
:diminish "")

0 comments on commit cc5f7e0

Please sign in to comment.