is it a conflict with counsel-mode
dolmens opened this issue · 2 comments
dolmens commented
(use-package counsel
:diminish ivy-mode counsel-mode
:init
;; here is ok
;; (counsel-mode)
:bind (("C-s" . swiper-isearch)
:map ivy-minibuffer-map
("RET" . ivy-alt-done)
("C-j" . ivy-immediate-done))
:config
(ivy-mode)
;; and here is not
(counsel-mode)
)
(use-package ivy-rich
:after ivy
:init
(setq ivy-rich-path-style 'abbrev)
:config
(ivy-rich-mode))
cannot use ivy-rich to switch buffer. but if i move the counsel-mode to :init section then all are ok. i don't know why.
and this is my full init.el:
(add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory))
(require 'package)
;; Package Manager Settings
;;
;; add MELPA to the package archive
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
;; update the package metadata when missing
(unless package-archive-contents
(package-refresh-contents))
;; install use-package - https://github.com/jwiegley/use-package
(unless (package-installed-p 'use-package)
(package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)
;; Not enabled
(use-package auto-package-update)
;; Required by `use-package
(use-package diminish)
(use-package bind-key)
(let ((default-directory "~/.emacs.d/site-lisp/"))
(normal-top-level-add-subdirs-to-load-path))
(use-package counsel
:diminish ivy-mode counsel-mode
:init
;; here is ok
(counsel-mode)
:bind (("C-s" . swiper-isearch)
:map ivy-minibuffer-map
("RET" . ivy-alt-done)
("C-j" . ivy-immediate-done))
:config
(ivy-mode)
;; and here is not
;; (counsel-mode)
)
(use-package ivy-rich
:after ivy
:init
(setq ivy-rich-path-style 'abbrev)
:config
(ivy-rich-mode))
Yevgnen commented
Hi, please try something like
(use-package counsel
:hook (after-init . counsel-mode)
:diminish ivy-mode counsel-mode
:bind (("C-s" . swiper-isearch)
:map ivy-minibuffer-map
("RET" . ivy-alt-done)
("C-j" . ivy-immediate-done)))
(use-package ivy
:hook (after-init . ivy-mode))
(use-package ivy-rich
:after (ivy counsel)
:init (setq ivy-rich-path-style 'abbrev)
:config (ivy-rich-mode))
ivy-rich
should be loaded after both ivy
and counsel
. I will make it a bit clearer in the README.
dolmens commented
Solved. Thanks.