What does HackerNews think of consult?

:mag: consult.el - Consulting completing-read

Language: Emacs Lisp

#14 in Emacs
Emacs has code peek.

With lsp-mode it has that little window: https://emacs-lsp.github.io/lsp-ui/#lsp-ui-peek

Personally I use eglot with consult which temporarily switches the entire buffer to do the "peek" functionality rather than popping up a tiny window: https://github.com/minad/consult

Emacs does this by default. Anything you delete ends up in the "kill ring", and you can cycle through that when pasting ("yanking") something. Packages like Consult[1] provide version of the yank-pop command that, instead of cycling through the kill ring, make it searchable.

[1]: https://github.com/minad/consult

Others have mentioned the awesome projectile, but I think it should be said that Emacs now has built in project.el which has come in leaps and bounds (though probably still lacks some projectile features).

I use project.el alongside consult[1] which has many convenient wrapper functions over built-in ones, like an enhanced `switch-to-buffer` with project support. I am actually using an even tighter integration called consult-project-extra[2].

The most advanced and overkill solution would probably be to use bufler.el[3] which basically allows you to define your custom logic for buffer grouping.

[1] https://github.com/minad/consult

[2] https://github.com/Qkessler/consult-project-extra

[3] https://github.com/alphapapa/bufler.el

I do things like that inside Emacs with the consult-grep command from the Consult package, combined with the Orderless matching style, Embark to collect the results in a buffer. This has several advantages over the command line:

- Interactivity: the results are updated live as you type, so you catch typos sooner and can tweak the search terms as you go.

- The buffer of search results you collect with Embark is not dead text like it would be in the terminal, instead, each line is a link to the corresponding file taking you to the line that matched.

- Wgrep lets you edit all the matching lines in place!

Packages referenced:

1. Consult: https://github.com/minad/consult/

2. Orderless: https://github.com/oantolin/orderless

3. Embark: https://github.com/oantolin/embark

4. Wgrep: http://github.com/mhayashi1120/Emacs-wgrep/raw/master/wgrep....

I'll second this. Take a look at Vertico [1] and Consult [2] which really improve discoverability. Other nice packages (links found on the Vertico page) include Marginalia and Orderless.

[1]: https://github.com/minad/vertico

[2]: https://github.com/minad/consult