将邪恶领导者与使用包一起使用:错误(使用包):邪恶领导者/:配置:无效函数:(全局邪恶领导者模式)
Using evil-leader with use-package: Error (use-package): evil-leader/:config: Invalid function: (global-evil-leader-mode)
我正在尝试将 use-package
添加到我的 init.el
,但我 运行 遇到了这个错误:
Error (use-package): evil-leader/:config: Invalid function: (global-evil-leader-mode)
这是一个精简的 init.el
会产生该错误(假设 evil 和 evil-leader 已经安装)
(package-initialize)
(require 'use-package)
(use-package evil :ensure)
(use-package evil-leader
:ensure
:after evil
:config
((global-evil-leader-mode)
(evil-leader/set-leader ",")
(evil-leader/set-key
"b" 'buffer-menu)
; Apparently this needs to go after (global-evil-leader-mode)
; https://emacs.stackexchange.com/questions/30332/evil-leader-stops-working-when-i-eval-buffer
(evil-mode t)))
这是在 use-package
无法正常工作的情况下的设置方式:
(package-initialize)
(require 'evil)
(require 'evil-leader)
(global-evil-leader-mode)
(evil-leader/set-leader ",")
(evil-leader/set-key
"b" 'buffer-menu)
; Apparently this needs to go after (global-evil-leader-mode)
; https://emacs.stackexchange.com/questions/30332/evil-leader-stops-working-when-i-eval-buffer
(evil-mode t)
任何帮助确定我做错了什么的人都将不胜感激,谢谢!
我认为你应该去掉 :config
后面的括号
我正在尝试将 use-package
添加到我的 init.el
,但我 运行 遇到了这个错误:
Error (use-package): evil-leader/:config: Invalid function: (global-evil-leader-mode)
这是一个精简的 init.el
会产生该错误(假设 evil 和 evil-leader 已经安装)
(package-initialize)
(require 'use-package)
(use-package evil :ensure)
(use-package evil-leader
:ensure
:after evil
:config
((global-evil-leader-mode)
(evil-leader/set-leader ",")
(evil-leader/set-key
"b" 'buffer-menu)
; Apparently this needs to go after (global-evil-leader-mode)
; https://emacs.stackexchange.com/questions/30332/evil-leader-stops-working-when-i-eval-buffer
(evil-mode t)))
这是在 use-package
无法正常工作的情况下的设置方式:
(package-initialize)
(require 'evil)
(require 'evil-leader)
(global-evil-leader-mode)
(evil-leader/set-leader ",")
(evil-leader/set-key
"b" 'buffer-menu)
; Apparently this needs to go after (global-evil-leader-mode)
; https://emacs.stackexchange.com/questions/30332/evil-leader-stops-working-when-i-eval-buffer
(evil-mode t)
任何帮助确定我做错了什么的人都将不胜感激,谢谢!
我认为你应该去掉 :config