Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.34 KB

starter-kit-scala.org

File metadata and controls

50 lines (35 loc) · 1.34 KB

Starter Kit Scala

This is part of the Emacs Starter Kit.

Starter kit Scala

Support for the Scala programming language.

Load path.

(setq exec-path (append exec-path (list "/opt/scala-2.11.7/bin" )))

Install Scala packages

(setq install-packages (list 'ensime))
(dolist (package install-packages) (package-install package))

Use Scala’s scala-mode.el instead of Emacs’ scala.el

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 ------")