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))