1
0
Fork 0

[oni-core] Remove counsel (and ivy) and replace with vertico

This also brings in marginalia, orderless, consult, and embark.

I've been reading about these projects for a while and after some looking around
it seems like these are at the very least interesting, I'm trying it out for a
while.
This commit is contained in:
Tom Willemse 2022-03-01 23:52:56 -08:00
parent 90e9eb03dc
commit 3b29e9799f

View file

@ -4,8 +4,8 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2022.0228.005711 ;; Version: 2022.0301.234839
;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview dashboard mixed-pitch ace-window) ;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview dashboard mixed-pitch ace-window vertico marginalia orderless consult embark)
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by ;; it under the terms of the GNU General Public License as published by
@ -366,12 +366,56 @@ _s_: String list"
(ws-butler-global-mode) (ws-butler-global-mode)
(which-key-mode) (which-key-mode)
(auto-insert-mode) (auto-insert-mode)
(counsel-mode)
(global-diff-hl-mode) (global-diff-hl-mode)
;;; Remember minibuffer history across sessions. ;;; Remember minibuffer history across sessions.
(savehist-mode) (savehist-mode)
;;; Remember the place I left at in files when closing them. ;;; Remember the place I left at in files when closing them.
(save-place-mode) (save-place-mode)
;;; Vertico
(vertico-mode)
;;; Marginalia
(define-key minibuffer-local-map (kbd "M-A") 'marginalia-cycle)
(marginalia-mode)
;;; Orderless
(setq completion-styles '(basic partial-completion orderless))
;;; Consult
(global-set-key [remap switch-to-buffer] 'consult-buffer)
(global-set-key [remap projectile-switch-to-buffer] 'consult-project-buffer)
(global-set-key [remap project-switch-to-buffer] 'consult-project-buffer)
(global-set-key [remap bookmark-jump] 'consult-bookmark)
(global-set-key [remap yank-pop] 'consult-yank-pop)
(global-set-key [remap goto-line] 'consult-goto-line)
(global-set-key (kbd "M-g m") 'consult-mark)
(global-set-key (kbd "M-g M") 'consult-global-mark)
(global-set-key [remap imenu] 'consult-imenu)
;;; Embark
(global-set-key (kbd "C-.") 'embark-act)
(global-set-key (kbd "C-;") 'embark-dwim)
(global-set-key [remap describe-bindings] 'embark-bindings)
(defun oni-core-fit-window-to-buffer (window)
(fit-window-to-buffer window)
(with-selected-window window
(enlarge-window-horizontally 1)))
(add-to-list 'display-buffer-alist
`(,(rx string-start " *Embark Actions*")
display-buffer-in-side-window
(window-parameter (mode-line-format . none))
(side . right)
(slot . 0)
(window-width . oni-core-fit-window-to-buffer)))
(provide 'oni-core) (provide 'oni-core)
;;; oni-core.el ends here ;;; oni-core.el ends here