Skip to content

Instantly share code, notes, and snippets.

@gatspy
Created April 23, 2012 03:36
Show Gist options
  • Save gatspy/2468699 to your computer and use it in GitHub Desktop.
Save gatspy/2468699 to your computer and use it in GitHub Desktop.
;; yasnippet
(add-to-list 'load-path
"~/.emacs.d/yasnippet")
(require 'yasnippet) ;; not yasnippet-bundle
(yas/initialize)
(yas/load-directory "~/.emacs.d/yasnippet/snippets")
;; scala-mode
(add-to-list 'load-path
"~/.emacs.d/scala-mode")
(require 'scala-mode-auto) ;; 编辑.scala文件时自动启动scala mode
(add-hook 'scala-mode-hook
'(lambda ()
(scala-mode-feature-electric-mode)
))
;; scala yasnippet
(setq yas/my-directory "~/.emacs.d/scala-mode/contrib/yasnippet/snippets")
(yas/load-directory yas/my-directory)
(add-hook 'scala-mode-hook
'(lambda ()
(yas/minor-mode-on)
))
;; scala-ensime
(add-to-list 'load-path
"~/.emacs.d/ensime/elisp")
(require 'ensime)
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook) ;; scala mode下自动启动ensime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment