refactor(default): move +*-bindings.el loaders into config.el
No need for the extra indirection.
This commit is contained in:
parent
70fd17ebfd
commit
86ee153786
3 changed files with 31 additions and 50 deletions
|
@ -1,26 +0,0 @@
|
||||||
;;; config/default/+emacs.el -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
(require 'projectile) ; we need its keybinds immediately
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
|
||||||
;;; Reasonable defaults
|
|
||||||
|
|
||||||
(setq shift-select-mode t)
|
|
||||||
(delete-selection-mode +1)
|
|
||||||
|
|
||||||
(use-package! expand-region
|
|
||||||
:commands (er/contract-region er/mark-symbol er/mark-word)
|
|
||||||
:config
|
|
||||||
(defadvice! doom--quit-expand-region-a (&rest _)
|
|
||||||
"Properly abort an expand-region region."
|
|
||||||
:before '(evil-escape doom/escape)
|
|
||||||
(when (memq last-command '(er/expand-region er/contract-region))
|
|
||||||
(er/contract-region 0))))
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
|
||||||
;;; Keybinds
|
|
||||||
|
|
||||||
(when (modulep! +bindings)
|
|
||||||
(load! "+emacs-bindings"))
|
|
|
@ -1,21 +0,0 @@
|
||||||
;;; config/default/+evil.el -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
(defun +default-disable-delete-selection-mode-h ()
|
|
||||||
(delete-selection-mode -1))
|
|
||||||
(add-hook 'evil-insert-state-entry-hook #'delete-selection-mode)
|
|
||||||
(add-hook 'evil-insert-state-exit-hook #'+default-disable-delete-selection-mode-h)
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
|
||||||
;;; Keybindings
|
|
||||||
|
|
||||||
;; This section is dedicated to "fixing" certain keys so that they behave
|
|
||||||
;; sensibly (and consistently with similar contexts).
|
|
||||||
|
|
||||||
;; Make SPC u SPC u [...] possible (#747)
|
|
||||||
(map! :map universal-argument-map
|
|
||||||
:prefix doom-leader-key "u" #'universal-argument-more
|
|
||||||
:prefix doom-leader-alt-key "u" #'universal-argument-more)
|
|
||||||
|
|
||||||
(when (modulep! +bindings)
|
|
||||||
(load! "+evil-bindings"))
|
|
|
@ -565,6 +565,34 @@ Continues comments if executed from a commented line."
|
||||||
;;
|
;;
|
||||||
;;; Bootstrap configs
|
;;; Bootstrap configs
|
||||||
|
|
||||||
(if (featurep 'evil)
|
(cond
|
||||||
(load! "+evil")
|
((modulep! :editor evil)
|
||||||
(load! "+emacs"))
|
(defun +default-disable-delete-selection-mode-h ()
|
||||||
|
(delete-selection-mode -1))
|
||||||
|
(add-hook 'evil-insert-state-entry-hook #'delete-selection-mode)
|
||||||
|
(add-hook 'evil-insert-state-exit-hook #'+default-disable-delete-selection-mode-h)
|
||||||
|
|
||||||
|
;; Make SPC u SPC u [...] possible (#747)
|
||||||
|
(map! :map universal-argument-map
|
||||||
|
:prefix doom-leader-key "u" #'universal-argument-more
|
||||||
|
:prefix doom-leader-alt-key "u" #'universal-argument-more)
|
||||||
|
|
||||||
|
(when (modulep! +bindings)
|
||||||
|
(load! "+evil-bindings")))
|
||||||
|
|
||||||
|
(t
|
||||||
|
(add-hook 'doom-first-buffer-hook #'delete-selection-mode)
|
||||||
|
(setq shift-select-mode t)
|
||||||
|
|
||||||
|
(use-package! expand-region
|
||||||
|
:commands (er/contract-region er/mark-symbol er/mark-word)
|
||||||
|
:config
|
||||||
|
(defadvice! doom--quit-expand-region-a (&rest _)
|
||||||
|
"Properly abort an expand-region region."
|
||||||
|
:before '(evil-escape doom/escape)
|
||||||
|
(when (memq last-command '(er/expand-region er/contract-region))
|
||||||
|
(er/contract-region 0))))
|
||||||
|
|
||||||
|
(when (modulep! +bindings)
|
||||||
|
(require 'projectile nil t) ; we need its keybinds immediately
|
||||||
|
(load! "+emacs-bindings"))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue