File: elm-imenu.el

package info (click to toggle)
elm-mode 0.20.3-6
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 500 kB
  • sloc: lisp: 2,284; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 393 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
;;; 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
     '((nil "^type \\([A-Z][^ \n]+\\)" 1)
       (nil "^type alias \\([A-Z][^ \n]+\\)" 1)
       (nil "^\\([^ ]+\\) :" 1)))))


(provide 'elm-imenu)
;;; elm-imenu.el ends here