74729ab9307b

Update some clojure syntax script stuff
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sat, 20 Feb 2016 13:18:08 +0000
parents 0ba11224bd3d
children 99e032674ddd
branches/tags (none)
files .hgsub .hgsubstate vim/vimrc

Changes

--- a/.hgsub	Sat Feb 20 12:42:56 2016 +0000
+++ b/.hgsub	Sat Feb 20 13:18:08 2016 +0000
@@ -9,7 +9,7 @@
 vim/bundle/badwolf               = [hg]https://bitbucket.org/sjl/badwolf/
 vim/bundle/bencode               = [hg]https://bitbucket.org/sjl/vim-bencode/
 vim/bundle/clam                  = [hg]https://bitbucket.org/sjl/clam.vim/
-vim/bundle/clojure-static        = [git]git://github.com/sjl/vim-clojure-static.git
+vim/bundle/clojure-static        = [git]git://github.com/guns/vim-clojure-static.git
 vim/bundle/commentary            = [git]git://github.com/tpope/vim-commentary.git
 vim/bundle/ctrlp                 = [git]git://github.com/kien/ctrlp.vim.git
 vim/bundle/delimitmate           = [git]git://github.com/Raimondi/delimitMate.git
--- a/.hgsubstate	Sat Feb 20 12:42:56 2016 +0000
+++ b/.hgsubstate	Sat Feb 20 13:18:08 2016 +0000
@@ -9,7 +9,7 @@
 2bcc153228d77451a22b2cf8cfbb432bae92cc12 vim/bundle/badwolf
 5d747e72d1f2e9bdd1d3f3a1375faabf5fe00313 vim/bundle/bencode
 2ed29341d197aa8e49568b579c02b1ce6f76a34a vim/bundle/clam
-5201a3860dbc32814f44eaf9386245caa70a65e6 vim/bundle/clojure-static
+f1c53e290b16885c2eb3fc96e57d9984b627f735 vim/bundle/clojure-static
 dc349bb7d30f713d770fc1fa0fe209e6aab82dc8 vim/bundle/commentary
 c1646e3c28d75bcc834af4836f4c6e12296ba891 vim/bundle/ctrlp
 38487bbec8ba50834e257940b357de03991fa8f9 vim/bundle/delimitmate
--- a/vim/vimrc	Sat Feb 20 12:42:56 2016 +0000
+++ b/vim/vimrc	Sat Feb 20 13:18:08 2016 +0000
@@ -746,7 +746,8 @@
 " }}}
 " Clojure {{{
 
-let g:clojure_fold_extra = [
+" extra folding {{{
+let g:clojure_fold_extra = [ 
             \ 'defgauge',
             \ 'defmeter',
             \ 'defhistogram',
@@ -776,30 +777,37 @@
             \ 'defsketch'
             \
             \ ]
-
-let g:clojure_highlight_extra_defs = [
-            \ 'defparser',
-            \ 'deftest',
+" }}}
+
+" extra highlighting {{{
+let g:clojure_syntax_keywords = {
+        \ 'clojureMacro': [
             \ 'match',
             \
             \ 'defproject',
             \
+            \ 'defparser',
+            \ 'deftest',
+            \
             \ 'defquery',
             \ 'defqueries',
             \
             \ 'defform',
             \
             \ 'deferror',
-            \ 'when-found',
-            \ 'when-valid',
             \
             \ 'defroutes'
-            \ ]
-
-let g:clojure_highlight_extra_exceptions = [
+        \ ],
+        \ 'clojureCond': [
+            \ 'when-found',
+            \ 'when-valid'
+        \ ],
+        \ 'clojureException': [
             \ 'try+',
-            \ 'throw+',
-            \ ]
+            \ 'throw+'
+        \ ]
+    \ }
+" }}}
 
 augroup ft_clojure
     au!
@@ -822,8 +830,8 @@
     au syntax clojure RainbowParenthesesLoadSquare
     au syntax clojure RainbowParenthesesLoadBraces
 
-    " Since YCM is hosefucked for Clojure, we'll use omnicompletion on <c-n>
-    au FileType clojure inoremap <c-n> <c-x><c-o>
+    " Since YCM is hosefucked for Clojure, we'll use completefunc on <c-n>
+    au FileType clojure inoremap <c-n> <c-x><c-u>
 
     " And close the omnicomplete preview window after we're done with it.
     au InsertLeave *.clj if pumvisible() == 0|pclose|endif
@@ -839,18 +847,14 @@
     au FileType clojure noremap <buffer> ] :<c-u>call PareditSmartJumpClosing(0)<cr>
     " ))
 
+    " Navigate trees of sexps with arrows
+    au FileType clojure call s:vim_sexp_mappings()
     au FileType clojure noremap <buffer> <left> :<c-u>call SexpBack()<cr>
     au FileType clojure noremap <buffer> <right> :<c-u>call SexpForward()<cr>
     au FileType clojure noremap <buffer> <up> :<c-u>call SexpUp()<cr>
     au FileType clojure noremap <buffer> <down> :<c-u>call SexpDown()<cr>
 
     " Indent top-level form.
-    " au FileType clojure nmap <buffer> <localleader>= mz99[(v%='z
-    " ])
-
-    au FileType clojure call s:vim_sexp_mappings()
-
-    " Not sure about this but we'll give it a try.
     au FileType clojure nmap <buffer> gi mz99[(v%='z
     " ])
 augroup END