This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-08
Channels
- # atlanta-clojurians (1)
- # beginners (116)
- # cider (70)
- # cljs-dev (11)
- # cljsrn (2)
- # clojure (218)
- # clojure-italy (7)
- # clojure-nl (14)
- # clojure-nlp (11)
- # clojure-spec (8)
- # clojure-uk (113)
- # clojurescript (86)
- # core-async (14)
- # cursive (24)
- # datomic (64)
- # duct (1)
- # emacs (3)
- # fulcro (20)
- # graphql (10)
- # jobs-rus (1)
- # london-clojurians (1)
- # luminus (1)
- # nyc (1)
- # off-topic (24)
- # onyx (1)
- # parinfer (1)
- # pedestal (14)
- # portkey (11)
- # re-frame (36)
- # reagent (9)
- # reitit (5)
- # ring (1)
- # shadow-cljs (197)
- # spacemacs (21)
- # specter (22)
- # sql (15)
- # tools-deps (5)
Does anyone use ripgrep
? do you have problems grepping for \(when
in SPC /
(error in process sentinel, Invalid regex)?
I’ve googled a bit and found that indeed something like that happened in rg.el
package. Going to research a bit for spc /
I use pt
, for no particular reason, but I haven't noticed that problem with it.
@troglotit what exactly is the problem? I'm using "rg" as default search app - it slightly differs in syntax from "ag", but it works fine for me. I often do complex queries like searching for a string in only *.cljs files with added lines above and after the line (-C key)
Wait wait wait—@ag are you saying you can do those kinds of queries from within Spacemacs? I've wanted to do this sort of thing for a while and not known how. Example: exclude results from *.json
fixture files. Is that possible?
If I type --version
after SPC s t p
(for the pt
-based search I'm used to), I get an error:
> Error running timer: (error "Candidates function ‘helm-ag--do-ag-candidate-process’ should run a process")
(1) Strange that the error mentions ag
instead of pt
.
(2) I wonder if what you're describing is unique to rg
, which I notice isn't one of the built-in tools under the SPC s
menu.
I think (I need to check if that's accurate) it's because for SPC /
spacemacs uses helm-ag and helm-ag can use not just ag
. Anything you set in dotspacemacs-search-tools as the first thing will be used by default
yeah basically check man page for your search tool e.g. SPC h m rg
- you can use some of the arguments in SPC /
I get that what you're ultimately doing is including args in the rg
shell command rather than just a search string, but I think there might be some more config making that possible. I tried :(setq dotspacemacs-search-tools '("rg"))
then SPC /
and it immediately tells me let: Wrong type argument: commandp, helm-project-do-rg
rather than letting me search helm-style. If I reset the var back to '("pt")
it works fine, just without the possibility of intervening arguments.
I did this after a brew install ripgrep
, and rg
is a valid shell command now, but maybe I need to restart emacs? That error doesn't seem to indicate that, but who knows.
Ah, that worked (with pt
). Strange, but OK!
As another datapoint, for me "rg" was already first in the list. I installed ripgrep, and (`SPC /`) -g*clj foo
works for me.
yeah, the way how rg works it slightly annoying, it would immediately throw some errors but if you continue typing it will search. Now I think I want to find a way to execute actual search only after pressing RET
@troglotit ah yeah... rg uses rust's regexp syntax that I'm too lazy to learn. for those kind of things I still use ag
. SPC s a f
\(when