Skip to content

Instantly share code, notes, and snippets.

@tototoshi
Created October 29, 2010 17:52
Show Gist options
  • Save tototoshi/653993 to your computer and use it in GitHub Desktop.
Save tototoshi/653993 to your computer and use it in GitHub Desktop.
scala-mode-config.el
;;;;;;;;;;;
;; scala ;;
;;;;;;;;;;;
(setq load-path (cons "~/.emacs.d/scala-mode" load-path))
(require 'scala-mode-auto)
(add-hook 'scala-mode-hook
(lambda ()
(scala-electric-mode)
(setq imenu-generic-expression
'(
("var" "\\(var +\\)\\([^(): ]+\\)" 2)
("val" "\\(val +\\)\\([^(): ]+\\)" 2)
("override def" "^[ \\t]*\\(override\\) +\\(def +\\)\\([^(): ]+\\)" 3)
("implicit def" "^[ \\t]*\\(implicit\\) +\\(def +\\)\\([^(): ]+\\)" 3)
("def" "^[ \\t]*\\(def +\\)\\([^(): ]+\\)" 2)
("trait" "\\(trait +\\)\\([^(): ]+\\)" 2)
("class" "^[ \\t]*\\(class +\\)\\([^(): ]+\\)" 2)
("case class" "^[ \\t]*\\(case class +\\)\\([^(): ]+\\)" 2)
("object" "\\(object +\\)\\([^(): ]+\\)" 2)
))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment