From e46492be460338a5697bde168fd2e9a1d16a2f60 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 15 Oct 2015 23:28:31 -0700 Subject: [PATCH] flatten go-mode imenu-index --- 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 6b37b8b3..2c4b2ae6 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -2147,6 +2147,10 @@ window is active in the perspective." (local-set-key (kbd "M-.") 'godef-jump) (local-set-key (kbd "M-,") 'pop-tag-mark) (go-eldoc-setup) + (setq imenu-create-index-function + (lambda () + (imalison:flatten-imenu-index + (imenu-default-create-index-function)))) (set (make-local-variable 'company-backends) '(company-go))) (add-hook 'go-mode-hook 'imalison:go-mode-hook) (add-hook 'before-save-hook 'gofmt-before-save)))