Skip to content

Commit

Permalink
[tuanany-prelude] add evil-collection packages
Browse files Browse the repository at this point in the history
to avoid warning (evil-want-keybinding) when load evil and
evil-collection we set a special from (setq) before load evil and
evil-collection

we set (evil-want-keybinding) before load evil, evil-visualstart and
evil-collection

ref:
- https://github.com/emacs-evil/evil-collection#installation
- emacs-evil/evil-collection#60
  • Loading branch information
agungTuanany committed Feb 18, 2022
1 parent 09e0776 commit 3f987a9
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion modules/prelude-evil.el
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,21 @@
;;; evil-visualstar enables searching visual selection with *
;;; evil-numbers enables vim style numeric incrementing and decrementing

(prelude-require-packages '(evil goto-chg evil-surround evil-visualstar evil-numbers))
(prelude-require-packages '(
evil
goto-chg
evil-surround
evil-visualstar
evil-numbers
evil-collection))


;; avoid on warning for evil-collection before load evil
(setq evil-want-integration t)
(setq evil-want-keybinding nil)

(setq evil-want-C-u-scroll t)
(setq evil-want-C-i-jump nil)

(require 'evil-visualstar)

Expand All @@ -49,9 +63,14 @@
;; prevent esc-key from translating to meta-key in terminal mode
(setq evil-esc-delay 0)

;; instantiate all packages after installed
(evil-mode 1)
(global-evil-surround-mode 1)

(when (require 'evil-collection nil t)
(evil-collection-init))


(define-key evil-normal-state-map (kbd "C-A")
'evil-numbers/inc-at-pt)
(define-key evil-normal-state-map (kbd "C-S-A")
Expand Down

0 comments on commit 3f987a9

Please sign in to comment.