Compare commits

...

2 Commits

Author SHA1 Message Date
3d0afd3f07
Experimentally replace default ivy completion with vertico
This may change back in the future.

The ivy configuration is kept on purpose, in particular because some
counsel functions are still in use.  Maybe those can be also be replaced
later on, maybe with helm functions?  Not quite sure whether this is a
good idea, though.
2024-03-09 13:46:36 +01:00
f6c40ad619
Fix wrong candiate specification in custom grep-read-files function
Somehow mixed up the order, I suppose.
2024-03-09 13:45:49 +01:00
2 changed files with 20 additions and 15 deletions

33
init.el
View File

@ -2090,7 +2090,9 @@ Note that this workaround is incomplete, as explained in this comment."
(setq suggest-key-bindings t (setq suggest-key-bindings t
extended-command-suggest-shorter t extended-command-suggest-shorter t
completions-detailed t completions-detailed t
completion-cycle-threshold 10) completion-cycle-threshold 10
completion-styles '(basic substring initials partial-completion orderless)
completion-category-defaults nil)
(use-package helm (use-package helm
:ensure t :ensure t
@ -2142,9 +2144,7 @@ Note that this workaround is incomplete, as explained in this comment."
:commands (helm-show-kill-ring)) :commands (helm-show-kill-ring))
(use-package ivy (use-package ivy
:ensure t :commands (ivy-mode)
:commands (ivy-mode
ivy-resume)
:diminish ivy-mode :diminish ivy-mode
:init (setq ivy-use-virtual-buffers t :init (setq ivy-use-virtual-buffers t
ivy-magic-tilde nil ivy-magic-tilde nil
@ -2169,12 +2169,7 @@ Note that this workaround is incomplete, as explained in this comment."
:ensure t :ensure t
:commands (counsel-org-goto-all :commands (counsel-org-goto-all
counsel-info-lookup-symbol counsel-info-lookup-symbol
counsel-unicode-char counsel-unicode-char))
counsel-recentf
counsel-shell-history))
(use-package smex
:init (setq smex-save-file (expand-file-name "smex-items" emacs-d-userdata)))
(use-package swiper (use-package swiper
:ensure t :ensure t
@ -2191,6 +2186,17 @@ Note that this workaround is incomplete, as explained in this comment."
:commands (company-mode global-company-mode) :commands (company-mode global-company-mode)
:init (setq company-show-quick-access t)) :init (setq company-show-quick-access t))
(use-package marginalia
:ensure t
:commands (marginalia-mode))
(use-package vertico
:ensure t
:commands (vertico-mode))
(use-package orderless
:ensure t)
;; * Navigation ;; * Navigation
@ -2486,8 +2492,6 @@ eventuelly be set to nil, however)."
(use-package shell (use-package shell
:commands (shell) :commands (shell)
:bind (:map shell-mode-map
("C-r" . counsel-shell-history))
:config (progn :config (progn
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
(add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m) (add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)
@ -2935,13 +2939,15 @@ eventuelly be set to nil, however)."
minibuffer-depth-indicate-mode minibuffer-depth-indicate-mode
ace-window-display-mode ace-window-display-mode
key-chord-mode key-chord-mode
ivy-mode ;; ivy-mode
minions-mode minions-mode
which-key-mode which-key-mode
projectile-mode projectile-mode
yas-global-mode yas-global-mode
global-git-commit-mode global-git-commit-mode
;; global-company-mode ;; global-company-mode
marginalia-mode
vertico-mode
)) ))
(with-demoted-errors "Cannot activate mode: %s" (with-demoted-errors "Cannot activate mode: %s"
(funcall mode +1))) (funcall mode +1)))
@ -2996,7 +3002,6 @@ eventuelly be set to nil, however)."
(bind-key "C-S-c C-S-c" #'mc/edit-lines) (bind-key "C-S-c C-S-c" #'mc/edit-lines)
(bind-key "C-Z" #'undo-tree-redo) (bind-key "C-Z" #'undo-tree-redo)
(bind-key "C-c C-<" #'mc/mark-all-like-this) (bind-key "C-c C-<" #'mc/mark-all-like-this)
(bind-key "C-c C-r" #'ivy-resume)
(bind-key "C-c D" #'define-word) (bind-key "C-c D" #'define-word)
(bind-key "C-c J" #'avy-goto-word-or-subword-1) (bind-key "C-c J" #'avy-goto-word-or-subword-1)
(bind-key "C-c a" #'org-agenda) (bind-key "C-c a" #'org-agenda)

View File

@ -538,11 +538,11 @@ entries, even if I want to use the input directly."
(files (completing-read (files (completing-read
(format "Search for \"%s\" in files matching wildcard: " (format "Search for \"%s\" in files matching wildcard: "
regexp) regexp)
nil nil nil
(delete-dups (delete-dups
(delq nil (delq nil
(append (list default default-alias default-extension) (append (list default default-alias default-extension)
(mapcar #'car grep-files-aliases)))) (mapcar #'car grep-files-aliases))))
nil nil nil
'grep-files-history))) 'grep-files-history)))
(and files (and files
(or (cdr (assoc files grep-files-aliases)) (or (cdr (assoc files grep-files-aliases))