Skip to content

Latest commit

 

History

History
62 lines (48 loc) · 2.16 KB

emacs-scala.org

File metadata and controls

62 lines (48 loc) · 2.16 KB

Emacs Settings for Scala

We need to load the scala mode.

(packages-install '( scala-mode
                     ensime-mode
                     ))

We follow these instructions to hook it up with Yasnippet.

(autoload 'scala-mode "scala-mode"
  "Programming mode for Scala." t nil)

;; Shouldn't this be done by default?
(add-to-list 'auto-mode-alist '("\\.scala$" . scala-mode))

(add-hook 'scala-mode-hook
          '(lambda ()
             (yas/minor-mode-on)
             (scala-mode-feature-electric-mode)))

We follow these instructions to set it up with Ensime, since it current is not available as a package.

(when (file-exists-p (concat user-emacs-directory "ensime"))
  (add-to-list 'load-path (concat user-emacs-directory "ensime/elisp"))
  (autoload 'ensime-mode "ensime-mode"
    "Programming support mode for Scala." t nil)
  (add-hook 'scala-mode-hook 'ensime-scala-mode-hook))

Technical Artifacts

Make sure that we can simply require this library.

(provide 'init-scala)

Before you can build this on a new system, make sure that you put the cursor over any of these properties, and hit: C-c C-c