Switched from ivy to vertico

This commit is contained in:
Random936 2023-12-15 19:00:54 -08:00
parent 79a80b58bb
commit 390a7768a2
2 changed files with 18 additions and 56 deletions

View File

@ -137,15 +137,6 @@ Install use package for easier installation of other packages.
(setq use-package-compute-statistics t) (setq use-package-compute-statistics t)
#+end_src #+end_src
Fixes path issue that occurs on mac.
#+begin_src emacs-lisp
(use-package exec-path-from-shell
:config
(when (memq window-system '(mac ns x))
(exec-path-from-shell-initialize)))
#+end_src
** Installed Packages ** Installed Packages
This is a list of installed packages not included in any other category. This is a list of installed packages not included in any other category.
@ -184,11 +175,8 @@ Command Log Mode creates a window that logs all commands and corresponding keybi
(global-set-key (kbd "C-c C-d") #'helpful-at-point) (global-set-key (kbd "C-c C-d") #'helpful-at-point)
;; Look up *F*unctions (excludes macros). ;; Look up *F*unctions (excludes macros).
(global-set-key (kbd "C-h F") #'helpful-function) (global-set-key (kbd "C-h F") #'helpful-function))
;; Syncing with ivy and counsel
(setq counsel-describe-function-function #'helpful-callable)
(setq counsel-describe-variable-function #'helpful-variable))
#+end_src #+end_src
*** Perspective *** Perspective
@ -197,11 +185,10 @@ Command Log Mode creates a window that logs all commands and corresponding keybi
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package perspective (use-package perspective
:bind (("C-x b" . persp-ivy-switch-buffer) :bind (("C-x b" . persp-switch-to-buffer*)
("C-x k" . persp-kill-buffer*)) ("C-x k" . persp-kill-buffer*))
:custom (persp-mode-prefix-key (kbd "C-x w")) :custom (persp-mode-prefix-key (kbd "C-x w"))
:init :init (persp-mode))
(persp-mode))
#+end_src #+end_src
* Cosmetic * Cosmetic
@ -299,51 +286,34 @@ This adds relative line numbers while excluding certain modes.
Packages associated with Emacs auto-completion. This does not include auto-completion from language servers just the auto-completion of commands etc. Packages associated with Emacs auto-completion. This does not include auto-completion from language servers just the auto-completion of commands etc.
** Counsel ** Vertico
Adds various completion functions used by Ivy. Vertico is a package that implements a drop-down like menu in the mini buffer allowing for much better searching.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package counsel (use-package vertico
:bind (("M-x" . counsel-M-x) :init
("C-x C-f" . counsel-find-file) (vertico-mode))
:map minibuffer-local-map
("C-r" . counsel-minibuffer-history)))
#+end_src #+end_src
** Ivy One feature of Vertico that is really helpful is that it works with another built-in emacs package, ~savehist~, to save directory history when navigating with Vertico.
Ivy is a basic auto-completion package that completes Emacs functions.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package ivy (use-package savehist
:diminish :init
:bind (("C-s" . swiper) (savehist-mode))
:map ivy-minibuffer-map
("TAB" . ivy-alt-done)
("C-l" . ivy-alt-done)
("C-j" . ivy-next-line)
("C-k" . ivy-previous-line)
:map ivy-switch-buffer-map
("C-k" . ivy-previous-line)
("C-l" . ivy-done)
("C-d" . ivy-switch-buffer-kill)
:map ivy-reverse-i-search-map
("C-k" . ivy-previous-line)
("C-d" . ivy-reverse-i-search-kill))
:config
(ivy-mode 1))
#+end_src #+end_src
** Ivy-rich One last feature I will also add is the ~marginalia~ package which adds some nice /footnotes/ to the command information. This can be extra helpful when looking up Elisp functions for example.
Install *Ivy-rich* for function info in Ivy auto complete.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package ivy-rich (use-package marginalia
:init (ivy-rich-mode 1)) :after vertico
:init
(marginalia-mode))
#+end_src #+end_src
* Keybindings * Keybindings
Contains the configuration for any keybindings or packages relating to keybindings. Contains the configuration for any keybindings or packages relating to keybindings.

View File

@ -29,20 +29,12 @@ Below I am installing the actual package and adding some basic configuration.
** Lsp Additional Packages ** Lsp Additional Packages
*** Lsp-UI
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package lsp-ui (use-package lsp-ui
:hook (lsp-mode . lsp-ui-mode) :hook (lsp-mode . lsp-ui-mode)
:config (setq lsp-ui-sideline-show-diagnostics t)) :config (setq lsp-ui-sideline-show-diagnostics t))
#+end_src #+end_src
*** Lsp-Ivy
#+begin_src emacs-lisp
(use-package lsp-ivy :commands lsp-ivy-workspace-symbol)
#+end_src
** Company Mode ** Company Mode
Company is a package that automatically finds completions instead of making the user run a command for completions. Company is a package that automatically finds completions instead of making the user run a command for completions.