-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ripgrep search #7370
Comments
If someone writes a package for it we can use it. |
Um, I not sure I get what you mean. There's a stand-alone package here... But, is there a common agreed upon interface for search tools in spacemacs that needs to be implemented? For the time being, I just wrote a quick wrapper script called "ag" which does a best effort translation of ag's command line options and calls "rg" instead. |
If you're using helm-ag, you can easily substitute ripgrep for ag by setting the Hope that helps :) |
And since PT and ACK support in Spacemacs is essentially (defun spacemacs/helm-buffers-do-ack (&optional _)
"Search in opened buffers with `ack'."
(interactive)
(let ((helm-ag-base-command "ack --nocolor --nogroup"))
(helm-do-ag-buffers))) |
@ekmecic I'm not using helm, I'm using ivy. Anyway, I'd like spacemacs to take care of which search tool to use by just setting |
OP claimed the command line arguments were not compatible, so I assumed we would need another implementation. If not then that's great, this is basically ready for whomever wants to work on it. |
The current approach is cute but I don't know why I did this because it does not scale well and it is not very useful.
|
I'm looking into this, anybody understand helm-ag well can point me in the direction on how to make helm-ag handle grouping options for rg, I see this: |
rg support was just added to Helm: emacs-helm/helm#1625 |
WIP PR at #7490 |
Shouldn't this issue be closed, or tagged |
thanks @deb0ch, I forgot to label it |
In ag I could do, |
@Swoorup I think you should 'contact' ripgrep README file. I found following examples on that page:
|
Should we be giving multiple different lines of matches when the same match shows up multiple times on a line? e.g. have a file with content (
search for foobar see
show up in helm. |
@mijoharas rg returns multiple results with the |
@mijoharas see emacsorphanage/helm-ag#293 ... we'll figure this out |
See conversation with @mijoharas at syl20bnr#7370 (comment) and following conversation with @syohex at emacsorphanage/helm-ag#293 In a nutshell, emacs-helm-ag recommends --vimgrep to work around a bug in ag. It doesn't apply to ripgrep. I also filed a PR against emacs-helm-ag to update their README, see emacsorphanage/helm-ag#294
When will this appear in the master branch? |
It would be nice to have support for ripgrep for searching in spacemacs.
Unfortunately its command line options are not directly compatible with any other search tool so that it could be used as a drop in replacement for one.
The text was updated successfully, but these errors were encountered: