Skip to content

Commit 76c3bde

Browse files
committed
Pare back clj customizations.
* Remove reloading namespaces as it's a pain * Remove test customizations as they're not used * Don't line break thread macros too much
1 parent 1e68c7b commit 76c3bde

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

after/ftplugin/clojure.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
setlocal lispwords+=->,->>,do,match,describe,context,it,around
1+
setlocal lispwords+=do,match,describe,context,it,around

custom-clojure.vimrc

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,7 @@
11
nnoremap <leader>E :%Eval<CR>
2+
nnoremap <leader>R :Require<CR>
23
34
" Rainbow parentheses always on
45
au BufEnter *.clj RainbowParenthesesToggleAll
56

6-
" Parse implementation namespace from the first line in the test file
7-
" Example:
8-
" (ns foo-app.handler-spec)
9-
" => foo-app.handler
10-
function! s:GetNamespaceFromTest()
11-
let regex = "(ns\\s\\+\\(.*\\)-\\(spec\\|test\\)"
12-
let location = 1
13-
let line = getline(location)
14-
return substitute(line, regex, "\\1", "")
15-
endfunction
16-
17-
" Reload implementation namespace and eval test file
18-
function! RunTestWithReload()
19-
let namespace = s:GetNamespaceFromTest()
20-
execute 'Require ' . namespace
21-
%Eval
22-
endfunction
23-
24-
function! s:AutoReload()
25-
Require
26-
endfunction
27-
28-
autocmd BufRead *_spec.clj,*_test.clj nnoremap <buffer> <leader>t :call RunTestWithReload()<CR>
29-
autocmd BufWritePre *.clj :call s:AutoReload()
30-
317
let tlist_clojure_settings = 'lisp;f:function'

0 commit comments

Comments
 (0)