more fully override imenu configuration when using outshine's imenu #93
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using outshine's imenu functionality (from either
outshine-imenu
oroutshine-imenu-with-navi-regexp
), the variables that configure imenu behaviorare locally overwritten in a
let*
form (so thatimenu
will pick up onoutshine
headings rather than whatever tags would normally be used). However, I think it misses one key variable: it's important to also overwriteimenu-create-index function
, since if that is changed it essentially nerfs any of the other configuration (see the end part of the documentation.I noticed this bug when editing
R
files inspacemacs
: mylsp
configuration involves changing the value of
imenu-create-index-function
,which makes changes to the other variables inconsequential, and then outshine's
attempt to change the way imenu works by binding
imenu-generic-expression
hasno effect.
I don't currently use
navi
mode, but I made an analogous fix inoutshine-imenu-with-navi-regexp
which I assume would suffer from the same issue.I'm happy to also open an issue if it's preferred to have discussion over there, but figured I'd start with the PR since I already had a fix.