js2-mode
js2-mode copied to clipboard
feature request: has a chance to add a prefix for each imenu item
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.
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.