emacs.d/elpa/elm-mode-20191125.1919/elm-imenu.el

18 lines
450 B
EmacsLisp
Raw Normal View History

2019-12-12 21:36:58 +01:00
;;; elm-imenu.el --- imenu support for elm
;;; Commentary:
;;; Code:
(require 'imenu)
(defun elm-imenu-create-index ()
"Create an imenu index for the current buffer."
(save-excursion
(imenu--generic-function
'(("Type" "^type \\([A-Z][^ \n]+\\)" 1)
("Type Alias" "^type alias \\([A-Z][^ \n]+\\)" 1)
("Port" "^port \\([^ ]+\\)" 1)
("Function" "^\\([^ ]+\\) :" 1)))))
(provide 'elm-imenu)
;;; elm-imenu.el ends here