about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--configs/shared/.emacs.d/wpc/chrome.el14
-rw-r--r--configs/shared/.emacs.d/wpc/colorscheme.el10
-rw-r--r--configs/shared/.emacs.d/wpc/fonts.el9
-rw-r--r--configs/shared/.emacs.d/wpc/packages/wpc-javascript.el9
-rw-r--r--configs/shared/.emacs.d/wpc/packages/wpc-keybindings.el92
-rw-r--r--configs/shared/.emacs.d/wpc/packages/wpc-lisp.el26
-rw-r--r--configs/shared/.emacs.d/wpc/todo.el4
-rw-r--r--configs/shared/.emacs.d/wpc/wallpaper.el9
-rw-r--r--emacs.nix1
9 files changed, 89 insertions, 85 deletions
diff --git a/configs/shared/.emacs.d/wpc/chrome.el b/configs/shared/.emacs.d/wpc/chrome.el
index 4f535ebbad5a..133c7af355fa 100644
--- a/configs/shared/.emacs.d/wpc/chrome.el
+++ b/configs/shared/.emacs.d/wpc/chrome.el
@@ -6,9 +6,18 @@
 
 ;;; Code:
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Dependencies
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
 (require 'macros)
 (require 'alist)
 (require 'list)
+(require 'general)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Library
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defvar chrome/install-kbds? t
   "If t, install keybinding.")
@@ -69,10 +78,5 @@ Will open without toolbars if APP-MODE? is t."
    :action (lambda (entry)
              (chrome/open-url (cdr entry)))))
 
-(when chrome/install-kbds?
-  (evil-leader/set-key
-    "cb" #'chrome/browse
-    "cs" #'chrome/open-splash-pages))
-
 (provide 'chrome)
 ;;; chrome.el ends here
diff --git a/configs/shared/.emacs.d/wpc/colorscheme.el b/configs/shared/.emacs.d/wpc/colorscheme.el
index e9bba5ed37ad..830fc5ac3e28 100644
--- a/configs/shared/.emacs.d/wpc/colorscheme.el
+++ b/configs/shared/.emacs.d/wpc/colorscheme.el
@@ -15,6 +15,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (require 'cycle)
+(require 'general)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Constants
@@ -84,11 +85,12 @@ Cycle prev otherwise."
   (colorscheme/cycle :forward? nil))
 
 ;; Keybindings
-;; TODO: Prefer minor mode definition with a custom keymap.
 (when colorscheme/install-kbds?
-  (evil-leader/set-key
-    "Ft" #'colorscheme/next
-    "Pt" #'colorscheme/prev))
+  (general-define-key
+   :prefix "<SPC>"
+   :states '(normal)
+   "Ft" #'colorscheme/next
+   "Pt" #'colorscheme/prev))
 
 (provide 'colorscheme)
 ;;; colorscheme.el ends here
diff --git a/configs/shared/.emacs.d/wpc/fonts.el b/configs/shared/.emacs.d/wpc/fonts.el
index cc8b15c10c7e..30459c940a73 100644
--- a/configs/shared/.emacs.d/wpc/fonts.el
+++ b/configs/shared/.emacs.d/wpc/fonts.el
@@ -18,6 +18,7 @@
 (require 'cycle)
 (require 'device)
 (require 'maybe)
+(require 'general)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Constants
@@ -138,9 +139,11 @@ The size of the font is determined by `fonts/size'."
 
 (when fonts/keybindings?
   (progn
-    (evil-leader/set-key
-      "Ff" #'fonts/next
-      "Pf" #'fonts/prev)
+    (general-define-key
+     :prefix "<SPC>"
+     :states '(normal)
+     "Ff" #'fonts/next
+     "Pf" #'fonts/prev)
     (general-define-key "s-9" #'fonts/ivy-select)
     (general-define-key "s-0" #'fonts/reset-size)
     (general-define-key "s-j" #'fonts/decrease-size)
diff --git a/configs/shared/.emacs.d/wpc/packages/wpc-javascript.el b/configs/shared/.emacs.d/wpc/packages/wpc-javascript.el
index bd2b9b49f038..3de9fff3aaa5 100644
--- a/configs/shared/.emacs.d/wpc/packages/wpc-javascript.el
+++ b/configs/shared/.emacs.d/wpc/packages/wpc-javascript.el
@@ -11,6 +11,10 @@
 
 ;;; Code:
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Configuration
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
 ;; Constants
 (defconst wpc/js-hooks
   '(js-mode-hook web-mode-hook typescript-mode-hook js2-mode-hook rjsx-mode-hook)
@@ -26,11 +30,6 @@
       js-indent-level 2
       css-indent-offset 2)
 
-;; ;; javascript
-;; (evil-leader/set-key-for-mode 'rjsx-mode "t" #'wpc/toggle-between-js-test-and-module)
-;; (evil-leader/set-key-for-mode 'rjsx-mode "x" #'wpc/toggle-between-js-component-and-store)
-;; (evil-leader/set-key-for-mode 'rjsx-mode "u" #'wpc/jump-to-parent-file)
-
 ;; Flow for Javascript
 (use-package add-node-modules-path
   :config
diff --git a/configs/shared/.emacs.d/wpc/packages/wpc-keybindings.el b/configs/shared/.emacs.d/wpc/packages/wpc-keybindings.el
index 2cae7d3f7092..2ff4fe375829 100644
--- a/configs/shared/.emacs.d/wpc/packages/wpc-keybindings.el
+++ b/configs/shared/.emacs.d/wpc/packages/wpc-keybindings.el
@@ -5,13 +5,18 @@
 ;; This module hosts my Evil preferences
 ;;
 ;; Wish List:
-;; - drop support for `evil-leader' library in favor of `general.el'
 ;; - restore support for concise (n <kbd> <function>) instead of `general-mmap'
 ;; - restore support for `general-unbind'
 
 ;;; Code:
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Dependencies
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(require 'general)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Packages
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
@@ -86,51 +91,46 @@
 ;; kbds for magit is with `evil-magit'.
 (use-package evil-magit)
 
-;; expose a leader key
-(use-package evil-leader
-  :after (evil)
-  :config
-  (global-evil-leader-mode 1)
-  (evil-leader/set-leader "<SPC>")
-  (evil-leader/set-key
-    "i"   #'counsel-semantic-or-imenu
-    "I"   #'ibuffer
-    "hk"  #'helpful-callable
-    "hf"  #'helpful-function
-    "hm"  #'helpful-macro
-    "hc"  #'helpful-command
-    "hk"  #'helpful-key
-    "hv"  #'helpful-variable
-    "hp"  #'helpful-at-point
-    "s"   #'flyspell-mode
-    "S"   #'sort-lines
-    "a"   #'wpc-terminal/toggle
-    "="   #'align
-    "p"   #'flycheck-previous-error
-    "f"   #'wpc/find-file
-    "n"   #'flycheck-next-error
-    "N"   #'smerge-next
-    "W"   #'balance-windows
-    "gs"  #'magit-status
-    "E"   #'refine
-
-    "es" #'wpc/create-snippet
-    ;; TODO: Replace with `macros/ilambda' when that is working again.
-    "ev" (lambda () (interactive) (wpc/find-file-split "~/.config/nvim/init.vim"))
-    "ee" (lambda () (interactive) (wpc/find-file-split "~/.emacs.d/init.el"))
-    "ez" (lambda () (interactive) (wpc/find-file-split "~/.zshrc"))
-    "ea" (lambda () (interactive) (wpc/find-file-split "~/aliases.zsh"))
-    "ef" (lambda () (interactive) (wpc/find-file-split "~/functions.zsh"))
-    "el" (lambda () (interactive) (wpc/find-file-split "~/variables.zsh"))
-    "ex" (lambda () (interactive) (wpc/find-file-split "~/.Xresources"))
-    "em" (lambda () (interactive) (wpc/find-file-split "~/.tmux.conf"))
-
-    "l"  #'locate
-    "L"  #'list-packages
-    "B"  #'magit-blame
-    "w"  #'save-buffer
-    "r"  #'wpc/evil-replace-under-point
-    "R"  #'deadgrep))
+;; TODO: Consider moving this to another module.
+(general-define-key
+ :prefix "<SPC>"
+ :states '(normal)
+ "i" #'counsel-semantic-or-imenu
+ "I" #'ibuffer
+ "hk" #'helpful-callable
+ "hf" #'helpful-function
+ "hm" #'helpful-macro
+ "hc" #'helpful-command
+ "hk" #'helpful-key
+ "hv" #'helpful-variable
+ "hp" #'helpful-at-point
+ "s" #'flyspell-mode
+ "S" #'sort-lines
+ "a" #'wpc-terminal/toggle
+ "=" #'align
+ "p" #'flycheck-previous-error
+ "f" #'wpc/find-file
+ "n" #'flycheck-next-error
+ "N" #'smerge-next
+ "W" #'balance-windows
+ "gs" #'magit-status
+ "E" #'refine
+ "es" #'wpc/create-snippet
+ ;; TODO: Replace with `macros/ilambda' when that is working again.
+ "ev" (lambda () (interactive) (wpc/find-file-split "~/.config/nvim/init.vim"))
+ "ee" (lambda () (interactive) (wpc/find-file-split "~/.emacs.d/init.el"))
+ "ez" (lambda () (interactive) (wpc/find-file-split "~/.zshrc"))
+ "ea" (lambda () (interactive) (wpc/find-file-split "~/aliases.zsh"))
+ "ef" (lambda () (interactive) (wpc/find-file-split "~/functions.zsh"))
+ "el" (lambda () (interactive) (wpc/find-file-split "~/variables.zsh"))
+ "ex" (lambda () (interactive) (wpc/find-file-split "~/.Xresources"))
+ "em" (lambda () (interactive) (wpc/find-file-split "~/.tmux.conf"))
+ "l" #'locate
+ "L" #'list-packages
+ "B" #'magit-blame
+ "w" #'save-buffer
+ "r" #'wpc/evil-replace-under-point
+ "R" #'deadgrep)
 
 ;; create comments easily
 (use-package evil-commentary
diff --git a/configs/shared/.emacs.d/wpc/packages/wpc-lisp.el b/configs/shared/.emacs.d/wpc/packages/wpc-lisp.el
index 4dff3e452902..6260d8de2cb3 100644
--- a/configs/shared/.emacs.d/wpc/packages/wpc-lisp.el
+++ b/configs/shared/.emacs.d/wpc/packages/wpc-lisp.el
@@ -8,6 +8,16 @@
 
 ;;; Code:
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Dependencies
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(require 'general)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Configuration
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
 (defconst wpc/lisp-mode-hooks
   '(lisp-mode-hook
     emacs-lisp-mode-hook
@@ -92,24 +102,12 @@
   :config
   (general-add-hook 'emacs-lisp-mode #'ielm-mode))
 
-;; TODO: Should I be using `general-define-key' or `evil-leader/set-key'?  My
-;; gut say `general-define-key'.
 (general-define-key
  :keymaps 'emacs-lisp-mode-map
- :states 'normal
  :prefix "<SPC>"
- "x" #'eval-defun)
-
-(general-define-key
- :keymaps 'emacs-lisp-mode-map
  :states 'normal
- :prefix "<SPC>"
- "X" #'eval-buffer)
-
-(general-define-key
- :keymaps 'emacs-lisp-mode-map
- :states 'normal
- :prefix "<SPC>"
+ "x" #'eval-defun
+ "X" #'eval-buffer
  "d" (lambda ()
        (interactive)
        (with-current-buffer (current-buffer)
diff --git a/configs/shared/.emacs.d/wpc/todo.el b/configs/shared/.emacs.d/wpc/todo.el
index 7369f01d82c1..236912c086fd 100644
--- a/configs/shared/.emacs.d/wpc/todo.el
+++ b/configs/shared/.emacs.d/wpc/todo.el
@@ -289,9 +289,5 @@
   (todo/export-to-org todo/today)
   (alert (string/concat  "Exported today's TODOs to: " todo/org-file-path)))
 
-(when todo/install-kbds?
-  (evil-leader/set-key
-    "to" #'todo/orgify-today))
-
 (provide 'todo)
 ;;; todo.el ends here
diff --git a/configs/shared/.emacs.d/wpc/wallpaper.el b/configs/shared/.emacs.d/wpc/wallpaper.el
index 08758aef09c7..9aa41cd364a4 100644
--- a/configs/shared/.emacs.d/wpc/wallpaper.el
+++ b/configs/shared/.emacs.d/wpc/wallpaper.el
@@ -14,6 +14,7 @@
 (require 'fs)
 (require 'cycle)
 (require 'string)
+(require 'general)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Library
@@ -81,9 +82,11 @@
 ;; constants, etc. with the filename like `wallpaper'.
 
 (when wallpaper/keybindings?
-  (evil-leader/set-key
-    "Fw" #'wallpaper/next
-    "Pw" #'wallpaper/prev))
+  (general-define-key
+   :prefix "<SPC>"
+   :states '(normal)
+   "Fw" #'wallpaper/next
+   "Pw" #'wallpaper/prev))
 
 (provide 'wallpaper)
 ;;; wallpaper.el ends here
diff --git a/emacs.nix b/emacs.nix
index 8e3bf21d2424..895165394daf 100644
--- a/emacs.nix
+++ b/emacs.nix
@@ -29,7 +29,6 @@ let
       evil
       evil-collection
       evil-magit
-      evil-leader
       evil-commentary
       evil-surround
       key-chord