summaryrefslogtreecommitdiffstats
path: root/ftplugin/rust
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2018-07-08 15:16:28 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2018-07-08 15:16:28 +0200
commit055f7710b65dfa2df52fc0b5be2486ae36ac5751 (patch)
tree0b6c36a330e8c0c4e37ad521773d28b6c52ad3ec /ftplugin/rust
parent33f610feb73ce782cf41a7d9a377541991c692b5 (diff)
downloadvim-polyglot-055f7710b65dfa2df52fc0b5be2486ae36ac5751.tar.gz
vim-polyglot-055f7710b65dfa2df52fc0b5be2486ae36ac5751.zip
Update dependencies
Diffstat (limited to 'ftplugin/rust')
-rw-r--r--ftplugin/rust/tagbar.vim38
1 files changed, 38 insertions, 0 deletions
diff --git a/ftplugin/rust/tagbar.vim b/ftplugin/rust/tagbar.vim
new file mode 100644
index 00000000..5c95f357
--- /dev/null
+++ b/ftplugin/rust/tagbar.vim
@@ -0,0 +1,38 @@
+if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
+
+"
+" Support for Tagbar -- https://github.com/majutsushi/tagbar
+"
+if !exists(':Tagbar')
+ finish
+endif
+
+let s:save_cpo = &cpo
+set cpo&vim
+
+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',
+ \ ]
+ \ }
+
+" 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
+
+let &cpo = s:save_cpo
+unlet s:save_cpo
+
+
+" vim: set et sw=4 sts=4 ts=8:
+
+endif