From 70d4c2c784e793352b17294ccca3f934a164cd56 Mon Sep 17 00:00:00 2001 From: huaoguo Date: Wed, 9 Mar 2016 16:32:35 +0800 Subject: [PATCH] Fix bug: helm-imenu doesn't work in react-mode In react-mode, when invoke helm-imenu, the list is empty. Because this feature is only enabled in js2-mode, not js2-minor-mode. So we should enable it by ourself. link: https://github.com/mooz/js2-mode/blob/master/js2-mode.el#L11557 --- layers/+frameworks/react/packages.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layers/+frameworks/react/packages.el b/layers/+frameworks/react/packages.el index 8fe688a56..0fafacab1 100644 --- a/layers/+frameworks/react/packages.el +++ b/layers/+frameworks/react/packages.el @@ -55,6 +55,8 @@ (spacemacs/js-doc-set-key-bindings 'react-mode)) (defun react/post-init-js2-mode () + (add-hook 'react-mode-hook (lambda () + (setq imenu-create-index-function #'js2-mode-create-imenu-index))) (add-hook 'react-mode-hook 'js2-imenu-extras-mode) (add-hook 'react-mode-hook 'js2-minor-mode))