Add pcre2el for pcre defuns
This commit is contained in:
parent
2c44b65bc7
commit
774d61be68
3 changed files with 10 additions and 1 deletions
1
Cask
1
Cask
|
@ -72,6 +72,7 @@
|
|||
(depends-on "fancy-narrow")
|
||||
(depends-on "goto-last-change")
|
||||
(depends-on "imenu-list")
|
||||
(depends-on "pcre2el")
|
||||
(depends-on "rotate-text" :git "https://github.com/debug-ito/rotate-text.el")
|
||||
(depends-on "smart-forward")
|
||||
(depends-on "smartparens")
|
||||
|
|
|
@ -215,6 +215,8 @@
|
|||
:n [escape] 'reb-quit
|
||||
:n [backtab] 'reb-change-syntax))
|
||||
|
||||
(use-package pcre2el :commands (rxt-quote-pcre))
|
||||
|
||||
(use-package rotate-text
|
||||
:commands (rotate-text rotate-text-backward)
|
||||
:config (push '("true" "false") rotate-text-words))
|
||||
|
|
|
@ -32,6 +32,8 @@ buffers."
|
|||
(interactive "<a>")
|
||||
(swiper (or search (thing-at-point 'symbol))))
|
||||
|
||||
(defvar doom-ivy-ag-last-search nil)
|
||||
|
||||
;;;###autoload (autoload 'doom:ivy-ag-search "defuns-ivy" nil t)
|
||||
(evil-define-operator doom:ivy-ag-search (beg end search regex-p &optional dir)
|
||||
"Preform a counsel search with SEARCH. If SEARCH is nil and in visual mode,
|
||||
|
@ -44,7 +46,11 @@ DIR specifies the default-directory from which ag is run."
|
|||
(let ((counsel-ag-base-command
|
||||
(format "ag --nocolor --nogroup %s %%s -- ."
|
||||
(if regex-p "-Q" "")))
|
||||
(search (or search (and beg end (buffer-substring-no-properties beg end)))))
|
||||
(search (or search
|
||||
(and (evil-visual-state-p)
|
||||
(and beg end (rxt-quote-pcre (buffer-substring-no-properties beg end))))
|
||||
doom-ivy-ag-last-search)))
|
||||
(setq doom-ivy-ag-last-search search)
|
||||
(counsel-ag search (or dir (f-slash (doom/project-root))))))
|
||||
|
||||
;;;###autoload (autoload 'doom:ivy-ag-search-cwd "defuns-ivy" nil t)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue