aboutsummaryrefslogtreecommitdiffstats
path: root/oni-core.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2022-03-01 23:52:56 -0800
committerGravatar Tom Willemse2022-03-01 23:52:56 -0800
commit3b29e9799feef00529717f3bd244d2bf2e0bcef9 (patch)
treed1975796c09d88d7684057f5f08a0adcbd837fac /oni-core.el
parent90e9eb03dcb575a6be6a195ef5807ff06ba1de61 (diff)
downloademacs-config-3b29e9799feef00529717f3bd244d2bf2e0bcef9.tar.gz
emacs-config-3b29e9799feef00529717f3bd244d2bf2e0bcef9.zip
[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.
Diffstat (limited to 'oni-core.el')
-rw-r--r--oni-core.el50
1 files changed, 47 insertions, 3 deletions
diff --git a/oni-core.el b/oni-core.el
index c9d0f5c..1228966 100644
--- a/oni-core.el
+++ b/oni-core.el
@@ -4,8 +4,8 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2022.0228.005711
-;; 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)
+;; 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 vertico marginalia orderless consult embark)
;; 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
@@ -366,12 +366,56 @@ _s_: String list"
(ws-butler-global-mode)
(which-key-mode)
(auto-insert-mode)
-(counsel-mode)
(global-diff-hl-mode)
;;; Remember minibuffer history across sessions.
(savehist-mode)
;;; Remember the place I left at in files when closing them.
(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)
;;; oni-core.el ends here