aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/lisp
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r--.emacs.d/lisp/init-evil.el13
-rw-r--r--.emacs.d/lisp/init-misc.el18
2 files changed, 19 insertions, 12 deletions
diff --git a/.emacs.d/lisp/init-evil.el b/.emacs.d/lisp/init-evil.el
index 983cf77..535d48d 100644
--- a/.emacs.d/lisp/init-evil.el
+++ b/.emacs.d/lisp/init-evil.el
@@ -22,17 +22,8 @@
(kbd "gd") 'xref-find-definitions
(kbd "gr") 'xref-find-references
- (kbd "C-t") 'xref-pop-marker-stack
-
- (kbd "<SPC>j") 'evil-avy-goto-line-below
- (kbd "<SPC>k") 'evil-avy-goto-line-above
- (kbd "<SPC>w") 'evil-avy-goto-word-0
- (kbd "<SPC>f") 'evil-avy-goto-char)
-
- (evil-define-key 'visual 'global
- (kbd "<SPC>j") 'evil-avy-goto-line-below
- (kbd "<SPC>k") 'evil-avy-goto-line-above)
-
+ (kbd "C-t") 'xref-pop-marker-stack)
+
(evil-define-key 'normal text-mode-map
(kbd "j") 'evil-next-visual-line
(kbd "k") 'evil-previous-visual-line
diff --git a/.emacs.d/lisp/init-misc.el b/.emacs.d/lisp/init-misc.el
index 4275c5c..a34b0b5 100644
--- a/.emacs.d/lisp/init-misc.el
+++ b/.emacs.d/lisp/init-misc.el
@@ -54,7 +54,23 @@
(with-eval-after-load 'hideshow
(gx/diminish 'hs-minor-mode))
-(gx/maybe-require-package 'avy)
+(setq avy-background t
+ avy-all-windows t
+ avy-timeout-seconds 0.3)
+(when (gx/maybe-require-package 'avy)
+ (with-eval-after-load 'evil
+ (evil-define-key 'normal 'global
+ (kbd "<SPC>j") 'evil-avy-goto-line-below
+ (kbd "<SPC>k") 'evil-avy-goto-line-above
+ (kbd "<SPC>w") 'evil-avy-goto-word-0
+ (kbd "<SPC>f") 'evil-avy-goto-char)
+ (evil-define-key 'visual 'global
+ (kbd "<SPC>j") 'evil-avy-goto-line-below
+ (kbd "<SPC>k") 'evil-avy-goto-line-above)
+ (evil-define-key 'operator 'global
+ (kbd "<SPC>j") 'evil-avy-goto-line-below
+ (kbd "<SPC>k") 'evil-avy-goto-line-below)))
+
(gx/maybe-require-package 'rg)
(gx/maybe-require-package 'esup)