refactor(winum): enable preexisting Doom module
It turns out that we don't have to write all this configuration ourselves, we can just override the `winum` package recipe.
This commit is contained in:
parent
d4adbc2a16
commit
25343ca965
1 changed files with 8 additions and 28 deletions
36
config.org
36
config.org
|
|
@ -975,7 +975,7 @@ ophints
|
||||||
unicode
|
unicode
|
||||||
(vc-gutter +pretty)
|
(vc-gutter +pretty)
|
||||||
vi-tilde-fringe
|
vi-tilde-fringe
|
||||||
;;(window-select +numbers)
|
(window-select +numbers)
|
||||||
workspaces
|
workspaces
|
||||||
;;zen
|
;;zen
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
@ -2392,35 +2392,15 @@ To solve this issue, I've written my own fork of =winum=:
|
||||||
|
|
||||||
This fork generalizes the window numbering system to support indexing windows with any Lisp object, instead of just integers. We can then index regular windows with integers ~N~, and popup windows with cons cells ~(popup . N)~, allowing us to number them separately.
|
This fork generalizes the window numbering system to support indexing windows with any Lisp object, instead of just integers. We can then index regular windows with integers ~N~, and popup windows with cons cells ~(popup . N)~, allowing us to number them separately.
|
||||||
|
|
||||||
*** Configuration
|
*** Bindings
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package! winum
|
(dolist (n (number-sequence 1 9))
|
||||||
:after-call doom-switch-window-hook
|
(let ((function (intern (format "winum-select-window-%s" n))))
|
||||||
:config
|
(eval
|
||||||
(setq winum-auto-setup-mode-line nil)
|
`(map! :leader
|
||||||
(winum-mode +1)
|
:desc ,(format "Select window %s" n)
|
||||||
(map! :map evil-window-map
|
,(format "%s" n) #',function))))
|
||||||
"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)
|
|
||||||
(map! :leader
|
|
||||||
:desc "Select window 1" "1" #'winum-select-window-1
|
|
||||||
:desc "Select window 2" "2" #'winum-select-window-2
|
|
||||||
:desc "Select window 3" "3" #'winum-select-window-3
|
|
||||||
:desc "Select window 4" "4" #'winum-select-window-4
|
|
||||||
:desc "Select window 5" "5" #'winum-select-window-5
|
|
||||||
:desc "Select window 6" "6" #'winum-select-window-6
|
|
||||||
:desc "Select window 7" "7" #'winum-select-window-7
|
|
||||||
:desc "Select window 8" "8" #'winum-select-window-8
|
|
||||||
:desc "Select window 9" "9" #'winum-select-window-9))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Popup Management
|
*** Popup Management
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue