-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tagbar-batteries-included'
* tagbar-batteries-included: Nix overbearing ctags executable check Include Scala ctags definition for Tagbar Add standard plugin guards, modelines Remove help plugin stuff
- Loading branch information
Showing
10 changed files
with
188 additions
and
100 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--langdef=scala | ||
--langmap=scala:.scala | ||
|
||
--regex-scala=/^[ \t ]*((abstract|final|sealed|implicit|lazy)[ \t ]*)*(private[^ ]*|protected)?[ \t ]*class[ \t ]+([a-zA-Z0-9_]+)/\4/c,classes/ | ||
--regex-scala=/^[ \t ]*((abstract|final|sealed|implicit|lazy)[ \t ]*)*(private[^ ]*|protected)?[ \t ]*object[ \t ]+([a-zA-Z0-9_]+)/\4/c,objects/ | ||
--regex-scala=/^[ \t ]*((abstract|final|sealed|implicit|lazy)[ \t ]*)*(private[^ ]*|protected)?[ \t ]*((abstract|final|sealed|implicit|lazy)[ \t ]*)*case class[ \t ]+([a-zA-Z0-9_]+)/\6/c,case classes/ | ||
--regex-scala=/^[ \t ]*((abstract|final|sealed|implicit|lazy)[ \t ]*)*(private[^ ]*|protected)?[ \t ]*case object[ \t ]+([a-zA-Z0-9_]+)/\4/c,case objects/ | ||
--regex-scala=/^[ \t ]*((abstract|final|sealed|implicit|lazy)[ \t ]*)*(private[^ ]*|protected)?[ \t ]*trait[ \t ]+([a-zA-Z0-9_]+)/\4/t,traits/ | ||
--regex-scala=/^[ \t ]*type[ \t ]+([a-zA-Z0-9_]+)/\1/T,types/ | ||
--regex-scala=/^[ \t ]*((abstract|final|sealed|implicit|lazy|private[^ ]*(\[[a-z]*\])*|protected)[ \t ]*)*def[ \t ]+([a-zA-Z0-9_]+)/\4/m,methods/ | ||
--regex-scala=/^[ \t ]*((abstract|final|sealed|implicit|lazy|private[^ ]*|protected)[ \t ]*)*val[ \t ]+([a-zA-Z0-9_]+)/\3/l,constants/ | ||
--regex-scala=/^[ \t ]*((abstract|final|sealed|implicit|lazy|private[^ ]*|protected)[ \t ]*)*var[ \t ]+([a-zA-Z0-9_]+)/\3/l,variables/ | ||
--regex-scala=/^[ \t ]*package[ \t ]+([a-zA-Z0-9_.]+)/\1/p,packages/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters