* Custom imenu-generic-expression has no effect
@ 2022-03-26 10:22 joseph
0 siblings, 0 replies; only message in thread
From: joseph @ 2022-03-26 10:22 UTC (permalink / raw)
To: help-gnu-emacs
Hello!
I'd like some help making imenu index test assertions in js-jsx-mode.
The lines which should match a regexp look like
test('Name of test', (arg) => {
Here's what I've tried so far:
(setq js-imenu-generic-expression
'(("Tests" "test('\\(.*\\)',.*$" 1)))
(add-hook 'js-jsx-mode-hook (lambda () (setq imenu-generic-expression
js-imenu-generic-expression)))
In js-jsx-mode, (describe-variable imenu-generic-expression)
reveals that the variable is set correctly.
Nevertheless, after M-x imenu, the modeline reads
imenu-unavailable-error: imenu unavailable: "No items suitable for an
index found in this buffer"
Any advice would be greatly appreciated!
Joseph Turner
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-26 10:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-26 10:22 Custom imenu-generic-expression has no effect joseph
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).