aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/rul-init.d/ivy.el
diff options
context:
space:
mode:
authorRaúl Benencia <id@rbenencia.name>2023-07-20 07:53:35 -0700
committerRaúl Benencia <id@rbenencia.name>2023-07-22 10:45:18 -0700
commit5860445da55ac3abc3935c6ffd5e9bb4539225c9 (patch)
tree2de3124b4c0577245a0b7e1dec30732af7fcc191 /.emacs.d/rul-init.d/ivy.el
parentfd0754be08f4b2f9ef58625c17544a238afefade (diff)
emacs: move everything to ~/.emacs.d
Diffstat (limited to '.emacs.d/rul-init.d/ivy.el')
-rw-r--r--.emacs.d/rul-init.d/ivy.el38
1 files changed, 38 insertions, 0 deletions
diff --git a/.emacs.d/rul-init.d/ivy.el b/.emacs.d/rul-init.d/ivy.el
new file mode 100644
index 0000000..fcf69ca
--- /dev/null
+++ b/.emacs.d/rul-init.d/ivy.el
@@ -0,0 +1,38 @@
+(use-package ivy
+ :diminish (ivy-mode . "")
+ :init (ivy-mode 1) ; globally at startup
+
+ :bind (:map ivy-minibuffer-map
+ ("TAB" . ivy-alt-done))
+ :config
+ (setq ivy-use-virtual-buffers t)
+ (setq ivy-height 20)
+ (setq ivy-count-format "%d/%d ")
+ (setq ivy-re-builders-alist
+ '((swiper . ivy--regex-plus)
+ (t . ivy--regex-fuzzy)))
+)
+
+;; Override the basic Emacs commands
+(use-package counsel
+ :bind* ; load when pressed
+ (("M-x" . counsel-M-x)
+ ("C-s" . swiper)
+ ("C-x C-f" . counsel-find-file)
+ ("C-x C-r" . counsel-recentf) ; search for recently edited
+ ("C-c g" . counsel-git) ; search for files in git repo
+ ("C-c /" . counsel-ag) ; Use ag for regexp
+ ("C-x l" . counsel-locate)
+ ("C-x C-f" . counsel-find-file)
+ ("<f1> f" . counsel-describe-function)
+ ("<f1> v" . counsel-describe-variable)
+ ("<f1> l" . counsel-find-library)
+ ("<f2> i" . counsel-info-lookup-symbol)
+ ("<f2> u" . counsel-unicode-char)
+ ("C-c C-r" . ivy-resume))) ; Resume last Ivy-based completion
+
+(use-package ivy-hydra
+ :defer t
+ :after hydra)
+
+(provide 'init-ivy)
nihil fit ex nihilo