From 0d41efefdb3a92b9ab84f69d3ebbeeea80ba6783 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 29 Jun 2015 03:09:16 -0700 Subject: [PATCH] use imalison:flatten-imenu-index for js2-mode --- dotfiles/emacs.d/init.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index 564c2b2d..d13f94b1 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -1697,6 +1697,10 @@ window is active in the perspective." js2-indent-level 4 js2-basic-offset 4 js2-indent-switch-body t))) + (add-hook 'js2-mode-hook (lambda () + (setq imenu-create-index-function + (lambda () + (imalison:flatten-imenu-index (js2-mode-create-imenu-index)))))) (add-hook 'js2-mode-hook 'js2-imenu-extras-mode))) (use-package skewer-mode