Imenu and Use-package

A couple of years ago, I wrote about Jordon Biondo’s gist that allowed imenu to locate use-package blocks in your .emacs or init.el files. It’s really useful and I recommended it to everyone who spent any time editing their Emacs configuration.

Today, Fran Burstall commented that use-package now has built in support for this. All you need to do is set use-package-enable-imenu-support non-nil before use-package is loaded. The code looks very similar to Biondo’s gist except that it works for both use-package and require. Burstall isn’t sure when the capability was added and I can’t tell from the code. All I can tell you for sure is that it’s in the current version (2.3).

This entry was posted in General and tagged . Bookmark the permalink.