From 6cd2d5417d728ea96c5c52b34629c944a89eec60 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 11 Feb 2015 11:27:11 -0800 Subject: Update --- ftplugin/scala/tagbar.vim | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 ftplugin/scala/tagbar.vim (limited to 'ftplugin/scala') 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(':p:h:h:h') . '/ctags/scala.ctags' +endif -- cgit v1.2.3