diff options
author | Kyle Meyer <kyle@kyleam.com> | 2023-11-16 21:07:12 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2024-01-22 00:02:53 -0500 |
commit | 7863bba29a298f6403f4434fb94037209be0bf9f (patch) | |
tree | aab5579249877fec3e23cc0a763cc6c78618166a | |
parent | df476202189a51a2936b22f09c0f7f398709ff78 (diff) | |
download | emacs.d-7863bba29a298f6403f4434fb94037209be0bf9f.tar.gz |
Use vertico for completion
-rw-r--r-- | init.el | 51 |
1 files changed, 29 insertions, 22 deletions
@@ -192,7 +192,7 @@ '((name . "org-save-after-capture-refile"))) (bind-keys :map org-mode-map - ("C-c l" . org-goto) + ("C-c l" . consult-org-heading) ("C-c m" . km/org-prefix-map) ;; Don't let `org-cycle-agenda-files' binding override ;; custom `backward-kill-word' binding @@ -577,27 +577,33 @@ (with-eval-after-load 'avy (add-to-list 'avy-dispatch-alist (cons ?w #'km/avy-action-copy-line)))) -(use-package ivy - :diminish ivy-mode - :config - (setq ivy-count-format "(%d/%d) ") - (setq ivy-use-virtual-buffers t) - (setq ivy-virtual-abbreviate 'abbreviate) - (setq ivy-wrap t) - - (define-key ivy-minibuffer-map (kbd "C-'") nil) - (define-key ivy-minibuffer-map (kbd "C-.") 'ivy-avy) +(use-package vertico + :init + (vertico-mode 1)) - (ivy-mode 1)) +(use-package orderless + :init + (setq completion-styles '(orderless basic)) + (setq completion-category-overrides + '((file (styles basic partial-completion))))) -(use-package swiper - :bind (("M-s k" . swiper))) +(use-package consult + :chords (("jt" . consult-buffer)) + :bind (("C-x b" . consult-buffer) + ("C-x 4 b" . consult-buffer-other-window) + ("C-c z m" . consult-man) + ("M-g g" . consult-goto-line) + ("M-s k" . consult-line) + ("M-y" . consult-yank-pop) + :map minibuffer-local-map + ("M-s" . consult-history) + ("M-r" . consult-history)) + :config + (setq consult-narrow-key "<") + (setq consult-preview-key nil)) -(use-package counsel - :chords (("jt" . counsel-buffer-or-recentf) - ("kx" . counsel-M-x)) - :bind (("C-c l" . counsel-imenu) - ("M-y" . counsel-yank-pop))) +(use-package consult-imenu + :bind (("C-c l" . consult-imenu))) ;;; Buffers and files @@ -639,6 +645,8 @@ (setq tramp-default-method "sshx")) (use-package recentf + :init + (recentf-mode 1) :config (setq recentf-max-saved-items 100 recentf-save-file "~/.emacs.d/cache/recentf") @@ -735,7 +743,6 @@ :config (setq projectile-find-dir-includes-top-level t projectile-use-git-grep t) - (setq projectile-completion-system 'ivy) (setq projectile-git-submodule-command nil) (defun km/projectile-ignore-directory-p (name) @@ -1187,6 +1194,8 @@ ;;; Command interfaces +(key-chord-define-global "kx" #'execute-extended-command) + (use-package setkey :bind ("C-c v" . setkey-call)) @@ -1481,8 +1490,6 @@ select-enable-primary t)) (use-package man - :init - (define-key km/external-map "m" #'man) :config (setq Man-notify-method 'aggressive)) |