Sep 24, 2010

Setting the clojure-lein mode in emacs

First you should get the emacs configuration file. It is in your home directory as .emacs or .emacs.d/init.el (you should use ls -la to view the hidden files)

In that file you must insert this.

(let ((buffer (url-retrieve-synchronously
(set-buffer buffer)
(goto-char (point-min))
(re-search-forward "^$" nil 'move)
(eval-region (point) (point-max))
(kill-buffer (current-buffer))))

This will download come congigeration packages into the .emacs or .emacs.d directory and update the init.el file. Then you should remove the above code part (only that thing) from the init.el file.
Then open an emacs window and type

M-x package-list-packages
Then type r to update the list. And then select package (clojer-mode) from i and install it by x.

Then type;
M-x describe-variable and in the prompt type;

In that you should customize the variable to;
lein repl
then save it.
Now open a .clj file from emacs.

No comments:

Post a Comment

Your comments are always welcome ...