Skip to content

Commit

Permalink
new stuff, ensime, other goodies
Browse files Browse the repository at this point in the history
  • Loading branch information
bitemyapp committed Oct 5, 2012
1 parent 232dc88 commit 75238a1
Show file tree
Hide file tree
Showing 44 changed files with 13,161 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .Xdefaults
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ URxvt*perl-ext-common: default,matcher
URxvt*matcher.button: 3
URxvt*urlLauncher: google-chrome

XTerm*foreground: white
XTerm*background: black
2 changes: 2 additions & 0 deletions .Xresources
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ XTerm*scrollBar: false
XTerm*scrollKey: true
XTerm*saveLines: 1000
XTerm*multiClickTime: 250
UXTerm*foreground: white
UXTerm*background: black
10 changes: 7 additions & 3 deletions .bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ unset file
# reset \[\e[0m\]
# \e[1;32m\]
# \[$(tput setaf 1)\]
export PS1='\[$(tput bold)\]\[$(tput setaf 6)\]\[[\[$(tput setaf 4)\]\u@\[$(tput setaf 4)\]\h \W\[$(tput setaf 6)\]]\[$(tput setaf 2)\]\$\[\e[0m\] '
# export PS1='\[$(tput setaf 4)\]\[[\[$(tput setaf 5)\]\u@\[$(tput setaf 5)\]\h \W\[$(tput setaf 4)\]]\[$(tput setaf 1)\]\$\[\e[0m\] '
export PS1='\[\u@\h \W\]\$ '

alias ls='ls -G'
alias grep='grep --colour=auto'
Expand All @@ -18,6 +19,9 @@ alias gpom='git pull origin master && git push origin master'
alias gpte='git checkout experimental && git merge master && git push origin experimental && git checkout master'
alias gpts='git checkout staging && git merge master && git push origin staging && git checkout master'
alias gptp='git checkout production && git merge master && git push origin production && git checkout master'
alias pte='gpom && gpte && fab push_experimental_scar'
alias pts='gpom && gpts && fab push_staging_scar'

alias qke='emacs -q -nw'
alias redisstart='sudo launchctl start io.redis.redis-server'
alias redisstop='sudo launchctl stop io.redis.redis-server'
Expand All @@ -34,8 +38,8 @@ function replace() {
find . -type f | xargs sed -i "s/$1/$2/g"
}

export GOPATH=/usr/local/go
export PATH=$GOPATH/bin:/Users/callen/code/valgrind/Inst/bin:~/Library/Haskell/bin:/usr/local/Cellar/ruby/1.9.2-p290/bin:/usr/local/bin:~/bin:/usr/local/sbin:$PATH
export PATH=/usr/local/go/bin:/Users/callen/code/valgrind/Inst/bin:~/Library/Haskell/bin:/usr/local/Cellar/ruby/1.9.2-p290/bin:/usr/local/bin:~/bin:/usr/local/sbin:$PATH
export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules
source /usr/local/bin/virtualenvwrapper.sh
source ~/.ec2.sh
export LANG=en_US.UTF-8
21 changes: 14 additions & 7 deletions .emacs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
;; Scala
(require 'scala-mode-auto)

;; Scala
(load-library "ensime-config.el")

;; ~/.sbt/plugins/build.sbt
;; resolvers ++= Seq(Resolver.url("sbt-plugin-releases",
;; new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns))
Expand All @@ -113,7 +116,8 @@
(load-library "slime-config.el")

;; Tabbar
(load-library "tabbar-config.el")
(if (display-graphic-p)
(load-library "tabbar-config.el"))

;; Vala
(load-library "vala-config.el")
Expand All @@ -122,16 +126,17 @@
(load-library "yaml-config.el")

;; Nyan-mode
(require 'nyan-mode)
(if (display-graphic-p)
(require 'nyan-mode))

;; Color theme
(require 'color-theme)
(color-theme-initialize)
;; (require 'tomorrow-night-theme)
;; (require 'tomorrow-theme)
(require 'tomorrow-night-bright-theme)
;; (require 'color-theme-bitemyapp)
;; (color-theme-bitemyapp)
;; (require 'tomorrow-night-bright-theme)
(require 'color-theme-bitemyapp)
(color-theme-bitemyapp)

(if (string= system-type "darwin")
(custom-set-faces
Expand All @@ -147,5 +152,7 @@
;; If there is more than one, they won't work right.
'(default ((t (:background "black" :foreground "white" :inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 90 :width normal :foundry "unknown" :family "Monospace"))))))

(nyan-mode)
(nyan-start-animation)
(if (display-graphic-p)
(progn
(nyan-mode)
(nyan-start-animation)))
6 changes: 6 additions & 0 deletions .emacs.d/ensime/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ENSIME is Copyright 2010, Aemon Cannon
All Rights Reserved

The ENSIME Emacs client is licensed under the GNU Public License. See individual source files.

The ENSIME Server is licensed under a BSD License unless noted otherwise in individual files.
106 changes: 106 additions & 0 deletions .emacs.d/ensime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# ENSIME
the ENhanced Scala Interaction Mode for Emacs

# Links
- [ Downloads ](https://github.com/aemoncannon/ensime/downloads)
- [ Manual ](http://aemoncannon.github.com/ensime/index.html)
- [ Manual as PDF ](http://aemoncannon.github.com/ensime/manual.pdf)
- [ Discussion Group ](http://groups.google.com/group/ensime?hl=en)


## Features

- Highlight errors and warnings in your code buffers.
- Inspect the type of any expression.
- Browse packages
- Completion for variables, methods, constructors, etc.
- Incrementally search through classpath symbols
- Find all references to a symbol
- Jump to symbol definitions.
- Semantic Highlighting
- Automated Refactorings (rename, organize imports, extract method)
- Source Formatting
- AST-based selection
- Supports sbt7,10,11
- Embedded sbt shell
- REPL
- Debug support


## Demo Videos

- [Overview (a bit out of date)](http://www.youtube.com/watch?v=A2Lai8IjLoY)
- [Searching](http://www.youtube.com/watch?v=fcgnAJz98QE)
- [Debugger Support](http://www.youtube.com/watch?v=v7-G6vD42z8)
- [Import Suggestions](http://www.youtube.com/watch?v=Ynp8Df7-paw&hd=1)



## System Requirements

- Emacs 22 or later.
- Linux, Mac OSX, Windows
- Java Runtime
- A Scala 2.8.x or 2.9.x project


## Documentation

- [The ENSIME User Manual](http://aemoncannon.github.com/ensime/index.html)


## Getting Started

__1) Install scala-mode__

Although it's not required, ENSIME is designed to compliment scala-mode. scala-mode can be found in the Scala distribution under ./misc/scala-tool-support/emacs/.


__2) Install the ENSIME Server__

Download the ENSIME distribution from the github [downloads page](http://github.com/aemoncannon/ensime/downloads). Unpack the ENSIME distribution into a directory of your choosing.

Add the following lines to your .emacs file:

;; load the ensime lisp code...
(add-to-list 'load-path "ENSIME_ROOT/elisp/")
(require 'ensime)

;; This step causes the ensime-mode to be started whenever
;; scala-mode is started for a buffer. You may have to customize this step
;; if you're not using the standard scala mode.
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)


__3) If you are using sbt, install the ENSIME Sbt Plugin (otherwise, see the [manual](http://aemoncannon.github.com/ensime/index.html#tth_sEc3.1.2))__

Add the following lines to your project/plugins.sbt file:

addSbtPlugin("org.ensime" % "ensime-sbt-cmd" % "VERSION")

Replace VERSION with the latest version of the plugin, available on [the plugin page](https://github.com/aemoncannon/ensime-sbt-cmd). Then, from an sbt shell, generate your ENSIME project:

ensime generate

Note: Currently, it may be necessary to first delete your project/target directories before running 'ensime generate'.

You should now have a .ensime file in the root of your project. There's no need to edit this file manually as you can now specify ENSIME settings directly from your sbt build file. Check the [manual](http://aemoncannon.github.com/ensime/index.html#tth_sEc3.1.1) for details.


__5) Start ENSIME__

From inside Emacs, execute M-x ensime


## Developer Quick Start
Note: This section is for people who want to hack on ENSIME itself.

After cloning, and before you can run ENSIME, you must create the distribution directory structure. The sbt task 'stage' will create the directory 'dist' underneath the root clone directory. Then, follow the install instructions in section 2.2 above, substituting CLONE_DIR/dist as the root of your ENSIME distribution.


The work-flow I use when hacking ENSIME:

- Edit source files
- 'sbt stage'
- Stop existing ENSIME server by killing *inferior-ensime-server* buffer
- Restart ENSIME with M-x ensime
27 changes: 27 additions & 0 deletions .emacs.d/ensime/elisp/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
##===--- Makefile ---------------------------------------*- Makefile -*-===##
#
#
# The Ensime project
#
#
##===-------------------------------------------------------------------===##

EMACS = emacs

ELS = $(shell ls -1 *.el)
ELCS= $(ELS:.el=.elc)

.el.elc:
$(EMACS) -batch -L . \
-eval "(setq max-lisp-eval-depth 1500 max-specpdl-size 3000)" \
-eval "(mapc (lambda (dir) (add-to-list 'load-path dir)) (parse-colon-path (getenv \"LOAD_PATH\")))" \
-f batch-byte-compile $*.el

all: bytecompile

bytecompile: $(ELCS)

clean:
rm -rf $(ELCS)

.PHONY: all clean

0 comments on commit 75238a1

Please sign in to comment.