|
|
@ -568,86 +568,6 @@ Exclude some dirs from spamming recentf |
|
|
|
"q" '(imenu-list-quit-window :which-key "quit")) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
* ivy / counsel / swiper |
|
|
|
:PROPERTIES: |
|
|
|
:ID: 55c74ba9-7761-4545-8ddd-087d6ee33e4b |
|
|
|
:END: |
|
|
|
|
|
|
|
+BEGIN_SRC emacs-lisp |
|
|
|
; (require 'ivy) |
|
|
|
(use-package ivy |
|
|
|
:ensure t |
|
|
|
:diminish |
|
|
|
(ivy-mode . "") |
|
|
|
:defer t |
|
|
|
:init |
|
|
|
(ivy-mode 1) |
|
|
|
:bind |
|
|
|
("C-r" . ivy-resume) ;; overrides isearch-backwards binding |
|
|
|
:config |
|
|
|
(setq ivy-use-virtual-buffers t ;; recent files and bookmarks in ivy-switch-buffer |
|
|
|
ivy-height 20 ;; height of ivy window |
|
|
|
ivy-count-format "%d/%d" ;; current and total number |
|
|
|
ivy-re-builders-alist ;; regex replaces spaces with * |
|
|
|
'((t . ivy--regex-plus)))) |
|
|
|
|
|
|
|
; make counsel-M-x more descriptive |
|
|
|
(use-package ivy-rich |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:init |
|
|
|
(ivy-rich-mode 1)) |
|
|
|
|
|
|
|
(use-package counsel |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:bind |
|
|
|
(("M-x" . counsel-M-x) |
|
|
|
("C-x C-f" . counsel-find-file) |
|
|
|
("C-x C-r" . counsel-recentf) |
|
|
|
("C-x b" . counsel-switch-buffer) |
|
|
|
("C-c C-f" . counsel-git) |
|
|
|
("C-c h f" . counsel-describe-function) |
|
|
|
("C-c h v" . counsel-describe-variable) |
|
|
|
("M-i" . counsel-imenu))) |
|
|
|
; :map minibuffer-local-map ;;currently mapped to evil-redo |
|
|
|
; ("C-r" . 'counsel-minibuffer-history))) |
|
|
|
|
|
|
|
(use-package swiper |
|
|
|
:ensure t |
|
|
|
:bind |
|
|
|
("C-s" . swiper)) |
|
|
|
|
|
|
|
(use-package ivy-hydra |
|
|
|
:ensure t) |
|
|
|
+END_SRC |
|
|
|
|
|
|
|
* Helm |
|
|
|
As an alternative to ivy/counsel/swiper? |
|
|
|
+begin_src emacs-lisp |
|
|
|
(use-package helm |
|
|
|
:ensure t |
|
|
|
:hook |
|
|
|
(helm-mode . helm-autoresize-mode) |
|
|
|
:bind |
|
|
|
(("M-x" . helm-M-x) |
|
|
|
("C-s" . helm-occur) |
|
|
|
("C-x C-f" . helm-find-files) |
|
|
|
("C-x C-b" . helm-buffers-list) |
|
|
|
("C-x b" . helm-buffers-list) |
|
|
|
("C-x C-r" . helm-recentf) |
|
|
|
("C-x C-i" . helm-imenu)) |
|
|
|
:config |
|
|
|
(helm-mode) |
|
|
|
:custom |
|
|
|
(helm-split-window-inside-p t) ;; open helm buffer inside current window |
|
|
|
(helm-move-to-line-cycle-in-source t) |
|
|
|
(helm-echo-input-in-header-line t) |
|
|
|
(helm-autoresize-max-height 20) |
|
|
|
(helm-autoresize-min-height 5) |
|
|
|
) |
|
|
|
+end_src |
|
|
|
|
|
|
|
* Selectrum & Co. |
|
|
|
Uses default features of emacs instead of bringing a new framework in like helm or counsel |
|
|
|
#+begin_src emacs-lisp |
|
|
@ -719,6 +639,23 @@ Uses default features of emacs instead of bringing a new framework in like helm |
|
|
|
:init |
|
|
|
(setq prefix-help-command #'embark-prefix-help-command) |
|
|
|
:config |
|
|
|
;; for selectrum |
|
|
|
;; (defun current-candidate+category () |
|
|
|
;; (when selectrum-is-active |
|
|
|
;; (cons (selectrum--get-meta 'category) |
|
|
|
;; (selectrum-get-current-candidate)))) |
|
|
|
;; (add-hook 'embark-target-finders #'current-candidate+category) |
|
|
|
|
|
|
|
;; (defun current-candidates+category () |
|
|
|
;; (when selectrum-is-active |
|
|
|
;; (cons (selectrum--get-meta 'category) |
|
|
|
;; (selectrum-get-current-candidates |
|
|
|
;; ;; pass relative file names for dired. |
|
|
|
;; minibuffer-completing-file-name)))) |
|
|
|
;; (add-hook 'embark-candidate-collectors #'current-candidates+category) |
|
|
|
|
|
|
|
;; ;; no unnecessary computation delay after injection. |
|
|
|
;; (add-hook 'embark-setup-hook 'selectrum-set-selected-candidate) |
|
|
|
;; hide modeline of the embark live/completions buffers |
|
|
|
(add-to-list 'display-buffer-alist |
|
|
|
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*" |
|
|
@ -733,6 +670,87 @@ Uses default features of emacs instead of bringing a new framework in like helm |
|
|
|
:hook |
|
|
|
(embark-collect-mode . embark-consult-preview-minor-mode)) |
|
|
|
#+end_src |
|
|
|
|
|
|
|
* Helm |
|
|
|
As an alternative if I'm not happy with selectrum & co |
|
|
|
#+begin_src emacs-lisp |
|
|
|
(use-package helm |
|
|
|
:ensure t |
|
|
|
:hook |
|
|
|
(helm-mode . helm-autoresize-mode) |
|
|
|
;; :bind |
|
|
|
;; (("M-x" . helm-M-x) |
|
|
|
;; ("C-s" . helm-occur) |
|
|
|
;; ("C-x C-f" . helm-find-files) |
|
|
|
;; ("C-x C-b" . helm-buffers-list) |
|
|
|
;; ("C-x b" . helm-buffers-list) |
|
|
|
;; ("C-x C-r" . helm-recentf) |
|
|
|
;; ("C-x C-i" . helm-imenu)) |
|
|
|
:config |
|
|
|
(helm-mode) |
|
|
|
:custom |
|
|
|
(helm-split-window-inside-p t) ;; open helm buffer inside current window |
|
|
|
(helm-move-to-line-cycle-in-source t) |
|
|
|
(helm-echo-input-in-header-line t) |
|
|
|
(helm-autoresize-max-height 20) |
|
|
|
(helm-autoresize-min-height 5) |
|
|
|
) |
|
|
|
#+end_src |
|
|
|
|
|
|
|
* ivy / counsel / swiper |
|
|
|
:PROPERTIES: |
|
|
|
:ID: 55c74ba9-7761-4545-8ddd-087d6ee33e4b |
|
|
|
:END: |
|
|
|
|
|
|
|
+BEGIN_SRC emacs-lisp |
|
|
|
; (require 'ivy) |
|
|
|
(use-package ivy |
|
|
|
:ensure t |
|
|
|
:diminish |
|
|
|
(ivy-mode . "") |
|
|
|
:defer t |
|
|
|
:init |
|
|
|
(ivy-mode 1) |
|
|
|
:bind |
|
|
|
("C-r" . ivy-resume) ;; overrides isearch-backwards binding |
|
|
|
:config |
|
|
|
(setq ivy-use-virtual-buffers t ;; recent files and bookmarks in ivy-switch-buffer |
|
|
|
ivy-height 20 ;; height of ivy window |
|
|
|
ivy-count-format "%d/%d" ;; current and total number |
|
|
|
ivy-re-builders-alist ;; regex replaces spaces with * |
|
|
|
'((t . ivy--regex-plus)))) |
|
|
|
|
|
|
|
; make counsel-M-x more descriptive |
|
|
|
(use-package ivy-rich |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:init |
|
|
|
(ivy-rich-mode 1)) |
|
|
|
|
|
|
|
(use-package counsel |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:bind |
|
|
|
(("M-x" . counsel-M-x) |
|
|
|
("C-x C-f" . counsel-find-file) |
|
|
|
("C-x C-r" . counsel-recentf) |
|
|
|
("C-x b" . counsel-switch-buffer) |
|
|
|
("C-c C-f" . counsel-git) |
|
|
|
("C-c h f" . counsel-describe-function) |
|
|
|
("C-c h v" . counsel-describe-variable) |
|
|
|
("M-i" . counsel-imenu))) |
|
|
|
; :map minibuffer-local-map ;;currently mapped to evil-redo |
|
|
|
; ("C-r" . 'counsel-minibuffer-history))) |
|
|
|
|
|
|
|
(use-package swiper |
|
|
|
:ensure t |
|
|
|
:bind |
|
|
|
("C-s" . swiper)) |
|
|
|
|
|
|
|
(use-package ivy-hydra |
|
|
|
:ensure t) |
|
|
|
+END_SRC |
|
|
|
|
|
|
|
* misc |
|
|
|
#+begin_src emacs-lisp |
|
|
|
(use-package autorevert |
|
|
@ -1276,7 +1294,7 @@ Manage projects and jump quickly between its files |
|
|
|
;; requires ripgrep on system for rg functions |
|
|
|
;(use-package counsel-projectile |
|
|
|
; :ensure t |
|
|
|
; :config (counsel-projectile-mode)) |
|
|
|
; :config (counsel-projectile-mode) (setq ivy-use-virtual-buffers t ;; recent files and bookmarks in ivy-switch-buffer) |
|
|
|
|
|
|
|
(use-package helm-projectile |
|
|
|
:ensure t |
|
|
|