开发者

Emacs load-path scala-mode

I am trying to install ENSIME for emacs. On the first step, when I integrate the ./misc/scala-tool-support/emacs .elc files, the instructions say to

(add-to-list 'load-path "/path/to/some/directory/scala-mode")

Because of the way the directory is structured (where there is no dir scala-mode but all of the .el files are called scala-mode), I am unsure what this exactly specifies. I originally thought it jsut meant to do something like:

(add-to-list 'load-path "~/...../misc/scala-tool-support/emacs/"), but reading further down to the following made me rethink my assumption.

(setq yas/my-directory "/path/to/some/directory/scala-mode/contrib/yasnippet/snippets")
(yas/load-directory yas/my-directory)

Can someone clarify this pl开发者_开发知识库ease?

Thanks much.


The yas/load-directory call has nothing to do with your load-path. Yes, you had it right originally. Is this not working? If so, what error message do you get?


Here is my setup for scala-mode and ensime on Emacs. I'm on OS X. In the vendor/scala directory, it's just all the .el files from the compiler distribution. And ensime/dist is bin/ elisp/ and lib/ directories from a github download.

    ;; Scala Mode
(add-to-list 'load-path "/Users/you/.emacs.d/vendor/scala")


(require 'scala-mode-auto)
(add-to-list 'auto-mode-alist '("\\.scala$" . scala-mode))
(add-to-list 'load-path "/path/to/ensime/dist")
(require 'ensime)
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)


I've checked the scala-tool-support repo, all of the scala-related snippets for had been included in Yasnippet now. If we use the Yasnippet release version newer than 0.5.7 , the snippets for scala-mode should be included in /path/to/yasnippet/text-mode/scala-mode, so we don't need to set yas/load-directory by ourselves.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜