Fix ivy+wgrep integration
This commit is contained in:
parent
52c599788a
commit
8ea00421b0
3 changed files with 9 additions and 2 deletions
|
@ -271,7 +271,7 @@
|
|||
(use-package wgrep
|
||||
:commands (wgrep-setup wgrep-change-to-wgrep-mode)
|
||||
:config
|
||||
(def-popup! "^\\*ivy-occur.+" :align below :size 25 :select t :regexp t)
|
||||
(def-popup! "^\\*ivy-occur counsel-ag" :align below :size 25 :select t :regexp t)
|
||||
(setq wgrep-auto-save-buffer t)
|
||||
(advice-add 'wgrep-abort-changes :after 'doom/popup-close)
|
||||
(advice-add 'wgrep-finish-edit :after 'doom/popup-close))
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
(ivy-wgrep-change-to-wgrep-mode)))
|
||||
|
||||
(advice-add 'counsel-ag-function :override 'doom*counsel-ag-function)
|
||||
(define-key counsel-ag-map [backtab] 'ivy-occur)
|
||||
(define-key counsel-ag-map [backtab] 'doom/counsel-ag-occur)
|
||||
|
||||
(setq counsel-find-file-ignore-regexp "\\(?:^[#.]\\)\\|\\(?:[#~]$\\)\\|\\(?:^Icon?\\)"))
|
||||
|
||||
|
|
|
@ -125,5 +125,12 @@ interferes with my custom :ag ex command `doom:ivy-ag-search'."
|
|||
(counsel--async-command ag-cmd))
|
||||
nil)))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/counsel-ag-occur ()
|
||||
"Invoke the search+replace wgrep buffer on the current ag search results."
|
||||
(interactive)
|
||||
(require 'wgrep)
|
||||
(call-interactively 'ivy-occur))
|
||||
|
||||
(provide 'defuns-ivy)
|
||||
;;; defuns-ivy.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue