diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2015-02-11 11:27:11 -0800 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-02-11 11:27:11 -0800 |
commit | 6cd2d5417d728ea96c5c52b34629c944a89eec60 (patch) | |
tree | f6d49573e7a22b1ede56055d3952707eab085c18 /ftplugin/scala | |
parent | b7a30b1f1a963902d9743ae229a1f9d18b887e17 (diff) | |
download | vim-polyglot-6cd2d5417d728ea96c5c52b34629c944a89eec60.tar.gz vim-polyglot-6cd2d5417d728ea96c5c52b34629c944a89eec60.zip |
Updatev1.11.4
Diffstat (limited to 'ftplugin/scala')
-rw-r--r-- | ftplugin/scala/tagbar.vim | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/ftplugin/scala/tagbar.vim b/ftplugin/scala/tagbar.vim new file mode 100644 index 00000000..19353ef1 --- /dev/null +++ b/ftplugin/scala/tagbar.vim @@ -0,0 +1,47 @@ +" +" Support for Tagbar -- https://github.com/majutsushi/tagbar +" +" Hat tip to Leonard Ehrenfried for the built-in ctags deffile: +" https://leonard.io/blog/2013/04/editing-scala-with-vim/ +" +if !exists(':Tagbar') + finish +endif + +let g:tagbar_type_scala = { + \ 'ctagstype' : 'scala', + \ 'kinds' : [ + \ 'p:packages:1', + \ 'V:values', + \ 'v:variables', + \ 'T:types', + \ 't:traits', + \ 'o:objects', + \ 'a:aclasses', + \ 'c:classes', + \ 'r:cclasses', + \ 'm:methods' + \ ], + \ 'sro' : '.', + \ 'kind2scope' : { + \ 'T' : 'type', + \ 't' : 'trait', + \ 'o' : 'object', + \ 'a' : 'abstract class', + \ 'c' : 'class', + \ 'r' : 'case class' + \ }, + \ 'scope2kind' : { + \ 'type' : 'T', + \ 'trait' : 't', + \ 'object' : 'o', + \ 'abstract class' : 'a', + \ 'class' : 'c', + \ 'case class' : 'r' + \ } +\ } + +" In case you've updated/customized your ~/.ctags and prefer to use it. +if get(g:, 'scala_use_builtin_tagbar_defs', 1) + let g:tagbar_type_scala.deffile = expand('<sfile>:p:h:h:h') . '/ctags/scala.ctags' +endif |