2019-03-04 03:28:35 -05:00
|
|
|
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'rust') != -1
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2018-07-08 09:16:28 -04:00
|
|
|
"
|
|
|
|
" Support for Tagbar -- https://github.com/majutsushi/tagbar
|
|
|
|
"
|
|
|
|
if !exists(':Tagbar')
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2018-10-08 13:00:59 -04:00
|
|
|
" vint: -ProhibitAbbreviationOption
|
2018-07-08 09:16:28 -04:00
|
|
|
let s:save_cpo = &cpo
|
|
|
|
set cpo&vim
|
2018-10-08 13:00:59 -04:00
|
|
|
" vint: +ProhibitAbbreviationOption
|
2018-07-08 09:16:28 -04:00
|
|
|
|
2018-10-08 13:00:59 -04:00
|
|
|
if !exists('g:tagbar_type_rust')
|
|
|
|
let g:tagbar_type_rust = {
|
|
|
|
\ 'ctagstype' : 'rust',
|
|
|
|
\ 'kinds' : [
|
|
|
|
\'T:types',
|
|
|
|
\'f:functions',
|
|
|
|
\'g:enumerations',
|
|
|
|
\'s:structures',
|
|
|
|
\'m:modules',
|
|
|
|
\'c:constants',
|
|
|
|
\'t:traits',
|
|
|
|
\'i:trait implementations',
|
|
|
|
\ ]
|
|
|
|
\ }
|
|
|
|
endif
|
2018-07-08 09:16:28 -04:00
|
|
|
|
|
|
|
" In case you've updated/customized your ~/.ctags and prefer to use it.
|
|
|
|
if !get(g:, 'rust_use_custom_ctags_defs', 0)
|
|
|
|
let g:tagbar_type_rust.deffile = expand('<sfile>:p:h:h:h') . '/ctags/rust.ctags'
|
|
|
|
endif
|
|
|
|
|
2018-10-08 13:00:59 -04:00
|
|
|
" vint: -ProhibitAbbreviationOption
|
2018-07-08 09:16:28 -04:00
|
|
|
let &cpo = s:save_cpo
|
|
|
|
unlet s:save_cpo
|
2018-10-08 13:00:59 -04:00
|
|
|
" vint: +ProhibitAbbreviationOption
|
2018-07-08 09:16:28 -04:00
|
|
|
|
|
|
|
|
|
|
|
" vim: set et sw=4 sts=4 ts=8:
|