Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Warning (evil-collection): `evil-want-keybinding' was set to nil but not before loading evil. #2

Open
luyangliuable opened this issue Sep 13, 2021 · 3 comments

Comments

@luyangliuable
Copy link
Owner

Warning (evil-collection): `evil-want-keybinding' was set to nil but not before loading evil.

Make sure to set `evil-want-keybinding' to nil before loading evil or evil-collection.

See emacs-evil/evil-collection#60 for more details.

@AbdeltwabMF
Copy link

AbdeltwabMF commented Mar 11, 2022

Use this code here right below to load the evil and evil-collection packages.

MAKE SURE to put this piece of code just below your package config in your .emacs file to avoid such an error.

  (use-package evil
    :init
    (progn
      (setq evil-undo-system 'undo-tree)
      ;; `evil-collection' assumes `evil-want-keybinding' is set to
      ;; `nil' before loading `evil' and `evil-collection'
      ;; @see https://github.com/emacs-evil/evil-collection#installation
      (setq evil-want-keybinding nil)
      )
    :config
    (progn
      (evil-mode 1)))

    (use-package evil-collection
      :after evil
      :ensure t
      :config
      (evil-collection-init))

@luyangliuable

@jalilsharif
Copy link

where is the .emacs file?

@Keiku
Copy link

Keiku commented Jul 27, 2023

I added to user-config in .spacemacs. In my case it works fine.

(defun dotspacemacs/user-config ()
  "Configuration for user code:
This function is called at the very end of Spacemacs startup, after layer
configuration.
Put your configuration code here, except for variables that should be set
before packages are loaded."

  ;; evil
  (use-package evil
    :init
    (progn
      (setq evil-undo-system 'undo-tree)
      ;; `evil-collection' assumes `evil-want-keybinding' is set to
      ;; `nil' before loading `evil' and `evil-collection'
      ;; @see https://github.com/emacs-evil/evil-collection#installation
      (setq evil-want-keybinding nil)
      )
    :config
    (progn
      (evil-mode 1)))

    (use-package evil-collection
      :after evil
      :ensure t
      :config
      (evil-collection-init))

)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants