Skip to content

Commit

Permalink
Finally get Tagbars + Clojure working nicely together
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Neufeld committed Dec 3, 2014
1 parent 84a8d53 commit 74f0dec
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
5 changes: 3 additions & 2 deletions link/.ctags
Expand Up @@ -5,8 +5,9 @@
--langdef=Clojure
--langmap=Clojure:.clj
--regex-clojure=/\([ \t]*create-ns[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/n,namespace/
--regex-clojure=/\([ \t]*def[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/d,definition/
--regex-clojure=/\([ \t]*defn-?[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/f,function/
--regex-clojure=/\([ \t]*def([ \t]+|\^:[-[:alnum:]*+!_:\/.?]+|\^{.*})+([-[:alnum:]*+!_:\/.?]+)/\2/d,definition/
--regex-clojure=/\([ \t]*defn[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/f,function/
--regex-clojure=/\([ \t]*defn-[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/p,private function/
--regex-clojure=/\([ \t]*defmacro[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/m,macro/
--regex-clojure=/\([ \t]*definline[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/i,inline/
--regex-clojure=/\([ \t]*defmulti[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/a,multimethod definition/
Expand Down
18 changes: 18 additions & 0 deletions link/.vim/vimrc
Expand Up @@ -143,6 +143,24 @@ let g:clojure_maxlines = 1000 " Search more lines for identation (correctness ov
let g:clojure_fuzzy_indent = 1
let g:clojure_fuzzy_indent_patterns = ['^with', '^def', '^let', 'describe', 'context']

"" Tagbar + Clojure
let g:tagbar_type_clojure = {
\ 'ctagstype' : 'clojure',
\ 'kinds' : [
\ 'a:multimethod definition',
\ 'b:multimethod instance',
\ 'c:definition (once)',
\ 'd:definition',
\ 'f:function',
\ 'i:inline',
\ 'm:macro',
\ 'n:namespace',
\ 'p:private function',
\ 's:struct',
\ 'v:intern',
\ ]
\ }

" Remember last location in file, but not for commit messages.
" see :help last-position-jump
au BufReadPost * if &filetype !~ '^git\c' && line("'\"") > 0 && line("'\"") <= line("$")
Expand Down

0 comments on commit 74f0dec

Please sign in to comment.