doomemacs/modules/ui/window-select/config.el
Henrik Lissner c2f5e41722
tweak(window-select): winum-auto-setup-mode-line = nil
Leave it to modeline modules, plugins, and/or the user to support this
plugin, rather than impose winum's (rather destructive) side-effects on
them all.
2022-10-23 02:30:13 +02:00

42 lines
1.2 KiB
EmacsLisp

;;; ui/window-select/config.el -*- lexical-binding: t; -*-
(use-package! switch-window
:when (modulep! +switch-window)
:defer t
:init
(global-set-key [remap other-window] #'switch-window)
:config
(setq switch-window-shortcut-style 'qwerty))
(use-package! ace-window
:unless (modulep! +switch-window)
:defer t
:init
(global-set-key [remap other-window] #'ace-window)
:config
(unless (modulep! +numbers)
(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)))
(setq aw-scope 'frame
aw-background t))
(use-package! winum
:when (modulep! +numbers)
:after-call doom-switch-window-hook
:config
(winum-mode +1)
;; winum modifies `mode-line-format' in a destructive manner. I'd rather leave
;; it to modeline plugins (or the user) to add this if they want it.
(setq winum-auto-setup-mode-line nil)
(map! :map evil-window-map
"0" #'winum-select-window-0-or-10
"1" #'winum-select-window-1
"2" #'winum-select-window-2
"3" #'winum-select-window-3
"4" #'winum-select-window-4
"5" #'winum-select-window-5
"6" #'winum-select-window-6
"7" #'winum-select-window-7
"8" #'winum-select-window-8
"9" #'winum-select-window-9))