This is part of the Emacs Starter Kit.
Support for the Scala programming language.
(setq exec-path (append exec-path (list "/opt/scala-2.11.7/bin" )))
(setq install-packages (list 'ensime))
(dolist (package install-packages) (package-install package))
Replace the Scala mode that comes with Emacs by the Scala mode supplied by the Scala distribution itself.
(setq stack-trace-on-error t)
(setq semantic-load-turn-everything-on t)
(require 'ensime)
(add-hook 'scala-mode-hook 'run-coding-hook)
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)
(add-hook 'scala-mode-hook 'yas-minor-mode)
(add-to-list 'auto-mode-alist '("\\.scala\\'" . scala-mode))
(defun make-example-doc-url (type &optional member)
(ensime-make-java-doc-url-helper
"http://developer.example.com/apidocs/" type member))
;;(add-to-list 'ensime-doc-lookup-map '("^com\\.example\\." . make-example-doc-url))
(message "------ Starter Kit Scala loaded ------")