2.7 KiB
Ivy
Bring Emacs out of the eighties.
Config
There's a lot of occasions where Emacs asks you to input text to match a file name in a directory, or of a potential buffer selection. The family of packages ivy/swiper
1 work together toward this common goal of improving the default completion menu system.
(use-package ivy :diminish :config (ivy-mode 1))
Replacements
Include counsel
2, a customized set of commands to replace the built-in completion buffers. This will provide an experience similar to what you've maybe experienced on doom
or spacemacs
.
(use-package counsel :after ivy :custom (counsel-linux-app-format-function #'counsel-linux-app-format-function-name-only) :config (counsel-mode 1))
Additional details
Provide more information about each item in the completion menu with ivy-rich
3. This will include snippets from any available documentation, or active buffers.
(use-package ivy-rich :after counsel :init (ivy-rich-mode 1))
Popup selection frame
Display ivy
1 completions in a popup buffer with the ivy-posframe
4 package. I prefer to use this since the menu appears in the center of my screen, stopping my from having to tilt my head to look down at the default completion menu appearing in the mini-buffer.
(use-package ivy-posframe :after ivy :when (window-system) :custom (ivy-posframe-display-functions-alist '((t . ivy-posframe-display))) (ivy-posframe-parameters '((parent-frame nil))) :config (ivy-posframe-mode 1))
Candidate selection sorting
Sort completion candidates based on how recently or frequently they're selected with prescient.el
5. This can be helpful when using M-x
to run commands that aren't bound to specific key-strokes.
(use-package ivy-prescient :after counsel :custom (ivy-prescient-enable-filtering nil) :config (prescient-persist-mode 1) (ivy-prescient-mode 1))