js2-mode icon indicating copy to clipboard operation
js2-mode copied to clipboard

feature request: has a chance to add a prefix for each imenu item

Open redguardtoo opened this issue 10 years ago • 1 comments

I need a hook like js2-before-display-imenu-item-hook, the value and line number of the imenu item will be passed in`, the return value is the prefix which will be appended to the display of the imenu item.

Prefix is empty string by default, but I could have a chance to set up its value.

The reason I need it is because I need more visual hint to display imenu items.

redguardtoo avatar Jul 14 '15 02:07 redguardtoo

Why don't you just write a wrapper for js2-mode-create-imenu-index? You can set imenu-create-index-function to it in js2-mode-hook.

dgutov avatar Jul 14 '15 02:07 dgutov