Permalink
Browse files

some clojure stuff

  • Loading branch information...
1 parent acd1eaa commit fcfaef8280365e973fa1a554c3cfe571adfae1cd locojaydev committed Jun 5, 2012
Showing with 75 additions and 4 deletions.
  1. +33 −0 compiler/cake-test-wrapper.py
  2. +20 −0 compiler/clojure.vim
  3. +21 −3 vimrc
  4. +1 −1 vundle
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+
+import os, subprocess
+
+def parse_filename(l):
+ ns = l.split(' ', 3)[-1].rsplit('/', 1)[0]
+ return os.path.join('./test', *ns.split('.')) + '.clj'
+
+def process_error(fn, l, lines):
+ lnum = int(l.rsplit(' ', 1)[-1].split(':')[-1])
+
+ message = lines.pop(0)
+
+ print '%s:%d:%s' % (fn, lnum, message)
+
+ return message
+
+if __name__ == '__main__':
+ out = subprocess.check_output(r"cake test | perl -pe 's/\e\[?.*?[\@-~]//g'", shell=True)
+
+ prev = ""
+ fn = None
+ lines = out.splitlines()
+ while lines:
+ l = lines.pop(0)
+ if l.startswith('cake test ') and '/' in l:
+ fn = parse_filename(l)
+
+ if l.startswith('FAIL!'):
+ prev = process_error(fn, l, lines)
+ else:
+ prev = l
+
View
@@ -0,0 +1,20 @@
+"============================================================================
+"Compiler: Clojure (cake test)
+"Maintainer: Steve Losh <steve@stevelosh.com>
+"License: MIT/X11
+"============================================================================
+
+" if exists("current_compiler")
+" finish
+" endif
+let current_compiler = "clojure"
+
+let s:cpo_save = &cpo
+set cpo-=C"endif
+
+let &l:makeprg=fnameescape(globpath(&runtimepath, 'compiler/cake-test-wrapper.py'))
+
+setlocal errorformat=%f:%l:%m
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
View
24 vimrc
@@ -177,6 +177,11 @@ set wildignore+=*.o,*.obj,*.pyc,*.class "compiled files, bytecode
set wildignore+=*.DS_Store
set wildignore+=*.pdf,*.xls,*.xlsx,*.doc
set wildignore+=*.jar
+" Lein
+set wildignore+=classes
+set wildignore+=lib
+
+
"Move lines up and down
@@ -305,6 +310,11 @@ if has("autocmd")
endif
"Clojure"
" autocmd FileType clojure set ts=2 sts=2 sw=2 expandtab
+ autocmd FileType clojure compiler clojure
+
+ "clojurescript
+ autocmd BufNewFile,BufRead *.cljs set filetype=clojurescript
+
"
"Css
autocmd Filetype css set omnifunc=csscomplete#CompleteCSS
@@ -741,9 +751,6 @@ Bundle 'tpope/vim-repeat.git'
Bundle 'tpope/vim-surround.git'
Bundle 'tpope/vim-speeddating.git'
-"Editing
-"Bundle 'vim-scripts/delimitMate.vim'
-Bundle 'kana/vim-smartinput'
"Task Management
"Bundle 'jceb/vim-orgmode'
@@ -782,13 +789,24 @@ if has('ruby')
" autocmd BufWritePost *.rst :Hammer<CR>
endif
+"Editing
+"Bundle 'vim-scripts/delimitMate.vim'
+Bundle 'kana/vim-smartinput'
+
+
"Clojusre
Bundle 'VimClojure'
"Highlight Clojure's builtins
let g:vimclojure#HighlightBuiltins=1
"Rainbow parentheses'!
let g:vimclojure#ParenRainbow=1
+" Bundle 'vim-scripts/slimv.vim'
+" Bundle 'gberenfield/sjl-slimv'
+" let g:slimv_leader = '\'
+" let g:lisp_rainbow = 1
+" let g:slimv_repl_syntax = 1
+
"help
2 vundle

0 comments on commit fcfaef8

Please sign in to comment.