dajva / rg.el

Emacs search tool based on ripgrep
https://rgel.readthedocs.io
GNU General Public License v3.0
465 stars 38 forks source link

Add imenu support #138

Closed nbarrientos closed 2 years ago

nbarrientos commented 2 years ago

This changeset sets the buffer-local variable imenu-create-index-function if rg-group-result is enabled, configuring Imenu to list all the matched files and hence allowing to quickly jump to them.

image

Closes #136

coveralls commented 2 years ago

Coverage Status

Coverage decreased (-1.08%) to 80.925% when pulling 64e211c871c6d6a6cdcdf2e0b02100e5a8544172 on nbarrientos:imenu into 444a8ccfea0b38452a0bc4c390a8ee01cfe30017 on dajva:master.

dajva commented 2 years ago

Thanks. Looks good at a glance. I'll have to test this out a bit and review the code early next week. I also just pushed emacs 28 support to CI so if you could rebase the patch on latest master it would be great.

nbarrientos commented 2 years ago

Thanks for looking at the patch. It's rebased now :)

nbarrientos commented 2 years ago

I've added a line to the documentation mentioning the Imenu integration.

dajva commented 2 years ago

Reviewed now and added some comments. Just some smaller stuff but the doc info link needs fixing before I can merge.

nbarrientos commented 2 years ago

Reviewed now and added some comments. Just some smaller stuff but the doc info link needs fixing before I can merge.

Thanks for reviewing.

I've applied (and rebased) changes to remove the unnecessary setq and to use buffer-substring-no-properties instead.

Regarding the docs I've just added an HTTP link for the time being. Hope it's good enough for now.

dajva commented 2 years ago

Super. Thanks a lot. Looking forward to using this myself.