Commit 3112ff79 authored by Bogdan Popa's avatar Bogdan Popa

add elm-imenu

parent 5e2e7043
;;; 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
......@@ -26,6 +26,7 @@
;;; Code:
(require 'elm-tags)
(require 'elm-format)
(require 'elm-imenu)
(require 'elm-indent)
(require 'elm-interactive)
(require 'elm-font-lock)
......@@ -82,8 +83,9 @@
(when (boundp 'electric-indent-inhibit)
(setq-local electric-indent-inhibit t))
(set (make-local-variable 'comment-start) "--")
(set (make-local-variable 'comment-end) "")
(setq-local comment-start "--")
(setq-local comment-end "")
(setq-local imenu-create-index-function #'elm-imenu-create-index)
(add-hook 'after-save-hook #'elm-mode-after-save-handler nil t)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment