Fork me on GitHub
#spacemacs
<
2017-06-27
>
jumar08:06:24

Is it possible to do a full-text search in all project files and also the source code of libraries used in the project (I assume leiningen)?

donyorm08:06:18

What are you searching for? , g g can take you to the definition of a specific symbol. Otherwise, I'm not sure

Sam H09:06:45

SPC / will do a project search with ag but only on your project files

jumar10:06:06

Yeah, I know those ones. Sometimes, I need to search for some string in 3rd party libraries - just to explore code or for debugging purposes. I used to use this feature in IntelliJ IDEA

Sam H10:06:37

Might be worth asking in #cider

practicalli-johnny13:06:47

@jumar if I know the namespace then I use , g n and search / through that list of vars for the namespace. Or generally search documentation using apropos, , h a.

practicalli-johnny13:06:46

If you require a namespace for a library once the repl is running then you also get auto-complete for the vars in that library (if you have auto-completion as a layer)

jumar13:06:25

thanks for tips. I'm pretty much aware of those options. However, I was really looking for the option to do some kind of full-text search through all the libraries; or at least through all namespaces/files of given library

jumar13:06:23

I guess it comes down to searching in all jars on a classpath.

jumar13:06:16

It might sound like a weird requirement, but I used to use this kind of stuff from time to time. Now, when I use (and love) spacemacs, I'm trying every possible option to avoid using any other editor 🙂

jumar14:06:58

The best thing I've found so far is to invoke cider-classpath, look for interesting jars and then do zipgrep "search-string" library.jar in eshell

practicalli-johnny21:06:56

@jumar I am curious about what you get from searching through all the libraries in a project, what are you trying to find or understand? I ask to learn if there is something I am missing out on. Thanks