lang/clojure: group & update evil integration
Also removes evil-normalize-keymaps on cider-repl-mode-hook, because cider-repl-mode isn't a minor mode. The purpose of evil-normalize-keymaps is to ensure evil is aware of evil keybinds in minor-mode keymaps when it is first enabled.
This commit is contained in:
parent
a25257d8da
commit
4fc7de442e
1 changed files with 10 additions and 12 deletions
|
@ -47,17 +47,6 @@
|
||||||
cider-repl-wrap-history nil
|
cider-repl-wrap-history nil
|
||||||
cider-stacktrace-default-filters '(tooling dup))
|
cider-stacktrace-default-filters '(tooling dup))
|
||||||
|
|
||||||
(when (featurep! :feature evil +everywhere)
|
|
||||||
(evil-define-key 'insert cider-repl-mode-map
|
|
||||||
[S-return] #'cider-repl-newline-and-indent)
|
|
||||||
(evil-define-key 'normal cider-repl-history-mode-map
|
|
||||||
"q" 'cider-repl-history-quit
|
|
||||||
[return] 'cider-repl-history-insert-and-quit
|
|
||||||
"l" 'cider-repl-history-occur
|
|
||||||
"s" 'cider-repl-history-search-forward
|
|
||||||
"r" 'cider-repl-history-search-backward
|
|
||||||
"U" 'cider-repl-history-undo-other-window))
|
|
||||||
|
|
||||||
;; TODO: Add mode-local labels when general support is in.
|
;; TODO: Add mode-local labels when general support is in.
|
||||||
(map! :localleader
|
(map! :localleader
|
||||||
(:map clojure-mode-map
|
(:map clojure-mode-map
|
||||||
|
@ -106,8 +95,17 @@
|
||||||
:n "b" #'cider-switch-to-repl-buffer
|
:n "b" #'cider-switch-to-repl-buffer
|
||||||
:n "B" #'+clojure|cider-switch-to-repl-buffer-and-switch-ns
|
:n "B" #'+clojure|cider-switch-to-repl-buffer-and-switch-ns
|
||||||
:n "c" #'cider-repl-clear-buffer)))
|
:n "c" #'cider-repl-clear-buffer)))
|
||||||
|
|
||||||
(when (featurep! :feature evil +everywhere)
|
(when (featurep! :feature evil +everywhere)
|
||||||
(add-hook 'cider-repl-mode-hook #'evil-normalize-keymaps)))
|
(evil-define-key 'insert cider-repl-mode-map
|
||||||
|
[S-return] #'cider-repl-newline-and-indent)
|
||||||
|
(evil-define-key 'normal cider-repl-history-mode-map
|
||||||
|
"q" 'cider-repl-history-quit
|
||||||
|
[return] 'cider-repl-history-insert-and-quit
|
||||||
|
"l" 'cider-repl-history-occur
|
||||||
|
"s" 'cider-repl-history-search-forward
|
||||||
|
"r" 'cider-repl-history-search-backward
|
||||||
|
"U" 'cider-repl-history-undo-other-window)))
|
||||||
|
|
||||||
(def-package! clj-refactor
|
(def-package! clj-refactor
|
||||||
:hook (clojure-mode . clj-refactor-mode)
|
:hook (clojure-mode . clj-refactor-mode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue