Remove doom!-order dependency

The doom-init-modules-hook will do the work at the correct timing
This commit is contained in:
Gerry Agbobada 2020-08-15 10:51:09 +02:00 committed by Gerry Agbobada
parent 911d7cb82c
commit 3ef2531356
No known key found for this signature in database
GPG key ID: BE26DBAFD866BE34
2 changed files with 94 additions and 96 deletions

View file

@ -17,6 +17,7 @@
(doom! :input (doom! :input
;;chinese ;;chinese
;;japanese ;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion :completion
company ; the ultimate code completion backend company ; the ultimate code completion backend
@ -179,8 +180,4 @@
:config :config
;;literate ;;literate
(default +bindings +smartparens) (default +bindings +smartparens))
:input
;;layout ; auie,ctsrnm is the superior home row
)

View file

@ -8,96 +8,97 @@
(doom-bepo-rotate-collection-keymaps-h-builder doom-bepo-cr-rotation-style)) (doom-bepo-rotate-collection-keymaps-h-builder doom-bepo-cr-rotation-style))
(add-hook 'evil-collection-setup-hook #'doom-bepo--evil-collection-hook) (add-hook 'evil-collection-setup-hook #'doom-bepo--evil-collection-hook)
(setq avy-keys '(?a ?u ?i ?e ?c ?, ?t ?s ?r ?n)) (add-transient-hook! 'doom-init-modules-hook
;; :ui window-select settings, ignoring +numbers flag for now (setq avy-keys '(?a ?u ?i ?e ?, ?c ?t ?s ?r ?n))
(after! ace-window ;; :ui window-select settings, ignoring +numbers flag for now
(setq aw-keys '(?a ?u ?i ?e ?c ?, ?t ?s ?r ?n))) (after! ace-window
(after! switch-window (setq aw-keys '(?a ?u ?i ?e ?, ?c ?t ?s ?r ?n)))
(setq switch-window-shortcut-style 'qwerty (after! switch-window
switch-window-qwerty-shortcuts '("a" "u" "i" "e" "," "c" "t" "s" "r"))) (setq switch-window-shortcut-style 'qwerty
switch-window-qwerty-shortcuts '("a" "u" "i" "e" "," "c" "t" "s" "r")))
(doom-bepo-rotate-ts-bare-keymap '(read-expression-map)) (doom-bepo-rotate-ts-bare-keymap '(read-expression-map))
(doom-bepo-rotate-bare-keymap '(evil-window-map) doom-bepo-cr-rotation-style) (doom-bepo-rotate-bare-keymap '(evil-window-map) doom-bepo-cr-rotation-style)
(map! :i "C-t" #'+default-newline (map! :i "C-t" #'+default-newline
(:when (featurep! :editor multiple-cursors) (:when (featurep! :editor multiple-cursors)
:prefix "gz" :prefix "gz"
:nv "t" #'evil-mc-make-cursor-move-next-line :nv "t" #'evil-mc-make-cursor-move-next-line
:nv "s" #'evil-mc-make-cursor-move-prev-line :nv "s" #'evil-mc-make-cursor-move-prev-line
;; the old toggle mapping (t) is made available both on "T" for mnemonics and ;; the old toggle mapping (t) is made available both on "T" for mnemonics and
;; "j" as a "classic" rotation ;; "j" as a "classic" rotation
:nv "T" #'+multiple-cursors/evil-mc-toggle-cursors :nv "T" #'+multiple-cursors/evil-mc-toggle-cursors
:nv "j" #'+multiple-cursors/evil-mc-toggle-cursors) :nv "j" #'+multiple-cursors/evil-mc-toggle-cursors)
(:when (featurep! :ui popup) (:when (featurep! :ui popup)
:n "C-$" #'+popup/toggle :n "C-$" #'+popup/toggle
:n "C-#" #'+popup/raise)) :n "C-#" #'+popup/raise))
(map! (map!
:leader :leader
:desc "Window" "é" 'evil-window-map :desc "Window" "é" 'evil-window-map
(:when (featurep! :ui popup) (:when (featurep! :ui popup)
:desc "Toggle last popup" "#" #'+popup/toggle) :desc "Toggle last popup" "#" #'+popup/toggle)
(:when (featurep! :ui workspaces) (:when (featurep! :ui workspaces)
:desc "Switch buffer" "«" #'switch-to-buffer) :desc "Switch buffer" "«" #'switch-to-buffer)
:desc "Switch to last buffer" "$" #'evil-switch-to-windows-last-buffer :desc "Switch to last buffer" "$" #'evil-switch-to-windows-last-buffer
(:when (featurep! :ui workspaces) (:when (featurep! :ui workspaces)
(:prefix-map ("TAB" . "workspace") (:prefix-map ("TAB" . "workspace")
:desc "Switch to last workspace" "$" #'+workspace/other :desc "Switch to last workspace" "$" #'+workspace/other
:desc "Next workspace" ")" #'+workspace/switch-right :desc "Next workspace" ")" #'+workspace/switch-right
:desc "Previous workspace" "(" #'+workspace/switch-left)) :desc "Previous workspace" "(" #'+workspace/switch-left))
(:prefix-map ("b" . "buffer") (:prefix-map ("b" . "buffer")
:desc "Previous buffer" "(" #'previous-buffer :desc "Previous buffer" "(" #'previous-buffer
:desc "Next buffer" ")" #'next-buffer) :desc "Next buffer" ")" #'next-buffer)
(:prefix-map ("c" . "code") (:prefix-map ("c" . "code")
:desc "Jump to documentation" "S" #'+lookup/documentation) :desc "Jump to documentation" "S" #'+lookup/documentation)
(:prefix-map ("g" . "git") (:prefix-map ("g" . "git")
(:when (featurep! :ui vc-gutter) (:when (featurep! :ui vc-gutter)
:desc "Jump to next hunk" ")" #'git-gutter:next-hunk :desc "Jump to next hunk" ")" #'git-gutter:next-hunk
:desc "Jump to previous hunk" "(" #'git-gutter:previous-hunk)) :desc "Jump to previous hunk" "(" #'git-gutter:previous-hunk))
(:prefix-map ("p" . "project") (:prefix-map ("p" . "project")
:desc "Browse other project" "»" #'doom/browse-in-other-project)) :desc "Browse other project" "»" #'doom/browse-in-other-project))
(after! treemacs (after! treemacs
(doom-bepo-rotate-ts-bare-keymap '(evil-treemacs-state-map))) (doom-bepo-rotate-ts-bare-keymap '(evil-treemacs-state-map)))
(after! (:or helm ivy) (after! (:or helm ivy)
(doom-bepo-rotate-ts-bare-keymap +default-minibuffer-maps)) (doom-bepo-rotate-ts-bare-keymap +default-minibuffer-maps))
(after! company (after! company
(doom-bepo-rotate-bare-keymap '(company-active-map company-search-map) doom-bepo-cr-rotation-style)) (doom-bepo-rotate-bare-keymap '(company-active-map company-search-map) doom-bepo-cr-rotation-style))
(after! helm (after! helm
(doom-bepo-rotate-bare-keymap '(helm-map) doom-bepo-cr-rotation-style)) (doom-bepo-rotate-bare-keymap '(helm-map) doom-bepo-cr-rotation-style))
(after! general (after! general
(doom-bepo-rotate-evil-keymap doom-bepo-cr-rotation-style)) (doom-bepo-rotate-evil-keymap doom-bepo-cr-rotation-style))
(after! evil-snipe (after! evil-snipe
(doom-bepo--evil-collection-hook (doom-bepo--evil-collection-hook
nil nil
'(evil-snipe-local-mode-map evil-snipe-override-local-mode-map))) '(evil-snipe-local-mode-map evil-snipe-override-local-mode-map)))
(after! lispyville (after! lispyville
;; <> en direct ;; <> en direct
(general-translate-key '(normal motion) 'lispyville-mode-map (general-translate-key '(normal motion) 'lispyville-mode-map
"«" "<" "«" "<"
"»" ">")) "»" ">"))
(after! (evil magit evil-magit) (after! (evil magit evil-magit)
(doom-bepo-rotate-bare-keymap (doom-bepo-rotate-bare-keymap
'(magit-mode-map '(magit-mode-map
magit-diff-section-base-map magit-diff-section-base-map
magit-staged-section-map magit-staged-section-map
magit-unstaged-section-map magit-unstaged-section-map
magit-untracked-section-map) doom-bepo-cr-rotation-style) magit-untracked-section-map) doom-bepo-cr-rotation-style)
;; Without this, "s" is mapped to 'magit-delete-thing (the old "k" for "kill") and ;; Without this, "s" is mapped to 'magit-delete-thing (the old "k" for "kill") and
;; takes precedence over the evil command to go up one line ;; takes precedence over the evil command to go up one line
(map! :map magit-mode-map "s" nil) (map! :map magit-mode-map "s" nil)
(doom-bepo--evil-collection-hook (doom-bepo--evil-collection-hook
nil nil
'(magit-mode-map '(magit-mode-map
magit-cherry-mode-map magit-cherry-mode-map
magit-mode-map magit-mode-map
magit-blob-mode-map magit-blob-mode-map
magit-diff-mode-map magit-diff-mode-map
magit-log-mode-map magit-log-mode-map
magit-log-select-mode-map magit-log-select-mode-map
magit-reflog-mode-map magit-reflog-mode-map
magit-status-mode-map magit-status-mode-map
magit-file-mode-map magit-file-mode-map
magit-log-read-revs-map magit-log-read-revs-map
magit-process-mode-map magit-process-mode-map
magit-refs-mode-map))) magit-refs-mode-map)))
(after! evil-easymotion (after! evil-easymotion
(doom-bepo-rotate-bare-keymap '(evilem-map) doom-bepo-cr-rotation-style)) (doom-bepo-rotate-bare-keymap '(evilem-map) doom-bepo-cr-rotation-style)))