Emacs (starter-kit and emacs for Mac OSX), Scala and Ensime Configuration steps

(Before starting with this i think you may want to delete the~/.emac, ~/.emacs.d or ~/.emacs~ files from you computer, if they already exit. this is just my view.. reason being that the settings in the .emacs file.. i noticed overshadowed the settings in the emacs start-kit version.)

NB: Note that, this is my cloned copy and is specific to my system and user name.

This post aims to guide you through the steps and get you setup based on my cloned copy.

To get cracking with this, type the following on the terminal: clone this git repo with the following:

git clone git@github.com:kengimel/emacs-dotfiles.git .emacs.d
ln -s .emacs.d emacs.d
cd emacs.d

next rename ikenna.el to your username on a mac that will be you shortname: the command below will give you the current username
 whoami    # this will return to tell you your current username
 mv kengimel.el yourusername.el

next rename kengimel.el to you system name, this can be gotten by typing:
 hostname                # this will return to tell you your current hostname / system name
 mv ikenna.el yourhostname.el

Sometimes the hostname may appear verbose use this command to rename it, if you rename it don’t to repeat the step above:
 scutil --set HostName yournewhostname

NB: you have to restart your machine for this to take effect

Next:

 git submodule init 
 git submodule update 

The commands above will update the ensime submodule for the project:

Next download and install emacs for Mac OSX.

 cd vendor/ENSIME 
 sbt update               # this may take a little while to come through
 sbt dist
 Stop existing ENSIME server by killing inferior-ensime-server buffer 
 Restart ENSIME with M-x ensime 
 M-x ensime-sbt #gives you ensime sbt goodness
 M-x eshell #gives you the already embedded command line terminal

Next open Applications folder and click Emacs.app to start emacs for Mac (You may notice that ensime will throw an error, don’t worry just carry out the next steps below)

C-x C-f (control-x and control-f) and open the file with you system name Locate this line (i guess this will be around line number 151) (add-to-list ‘load-path (concat dotfiles-dir “/vendor/ENSIME/elisp”)) and edit it to this (add-to-list ‘load-path (concat dotfiles-dir “/vendor/ENSIME/dist/elisp”))

DOWNLOAD SETUP THE FOLLOWING EMACS MODES:
NXML-MODE
AUTO-COMPLETE MODE

I advice to first try out your installation by debugging it with this command;

 emacs --debug-init 

And now you ready to start writing some wonderful concise scala code with the help of emacs ENSIME. kudos to the guys behind the emacs starter kit, technomancy, george agnelli, topfunky and aemon cannon.

ROCK ON !