practicalli / spacemacs

Content for the book - Clojure Development with Spacemacs
https://practical.li/spacemacs
Creative Commons Attribution Share Alike 4.0 International
110 stars 33 forks source link

Mention installing a search tool in getting started #226

Closed drewverlee closed 4 years ago

drewverlee commented 4 years ago

helm-ag needs a search tool such as ag, silver searcher, ack, etc... to work. My installed version of spacemacs on a clean ubuntu 20.04 didn't come with one and i choose to install ag to fix it.

practicalli-johnny commented 4 years ago

The external search tools I recommended are ripgrep (rg) or silver searcher (ag).

In a nutshell, ripgrep seems to be more efficient and use simpler approaches to searching, silver searcher has more features and may be slower on large code bases. These differences will not be noticable for most use cases.

Both tools are preferable to using ack or grep (although grep is more universal).

Spacemacs by default will use ripgrep over silver searcher if both are installed, unless the default order is changed in .spacemacs configuration

   dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep")

The ripgrep author states that rg is 5 times faster than ag and provides a comparison and detailed overview of ripgrep in this article https://blog.burntsushi.net/ripgrep/

There is also a quick comparison in the README of the ripgrep GitHub repository https://github.com/BurntSushi/ripgrep

There is an interesting feature comparison for grep style unix command line tools https://beyondgrep.com/feature-comparison/

practicalli-johnny commented 4 years ago

I have started an general cli tools page to be added to the Getting Started section, which will contain a search tool, fast-find, locate (for helm-locate), spell checking (although usually there by default) and any other tools.

Thank you

practicalli-johnny commented 4 years ago

New page added, covering search tools (rg, ag), locate (helm-locate), spell checking and clj-kondo for Clojure development (if someone didnt read the clojure install page)

https://practicalli.github.io/spacemacs/before-you-start/recommended-command-line-tools.html

The page is also referenced at the top of the spacemacs install section as a prerequisite