diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2019-09-04 16:04:21 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2019-09-04 16:04:21 +0200 |
commit | 933e42ea1f2d615c8ce5aa6daa2994e6369de3cf (patch) | |
tree | dd8398c36a6645585288247283f7cc52934268e4 /ftplugin | |
parent | cdd6d73e39c85feccdcace5c32b375de7ba25bae (diff) | |
download | vim-polyglot-933e42ea1f2d615c8ce5aa6daa2994e6369de3cf.tar.gz vim-polyglot-933e42ea1f2d615c8ce5aa6daa2994e6369de3cf.zip |
Change provider for puppet, closes #424
Diffstat (limited to 'ftplugin')
-rw-r--r-- | ftplugin/puppet_tagbar.vim | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/ftplugin/puppet_tagbar.vim b/ftplugin/puppet_tagbar.vim new file mode 100644 index 00000000..b607ccb0 --- /dev/null +++ b/ftplugin/puppet_tagbar.vim @@ -0,0 +1,48 @@ +if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'puppet') != -1 + finish +endif + +" Puppet set up for Tagbar plugin +" (https://github.com/majutsushi/tagbar). + +if !exists(':Tagbar') + finish +endif + +let g:tagbar_type_puppet = { + \ 'ctagstype': 'puppet', + \ 'kinds': [ + \ 'c:Classes', + \ 's:Sites', + \ 'n:Nodes', + \ 'v:Variables', + \ 'i:Includes', + \ 'd:Definitions', + \ 'r:Resources', + \ 'f:Defaults', + \ 't:Types', + \ 'u:Functions', + \], +\} + +if puppet#ctags#Type() == 'universal' + " There no sense to split objects by colon + let g:tagbar_type_puppet.sro = '__' + let g:tagbar_type_puppet.kind2scope = { + \ 'd': 'definition', + \ 'c': 'class', + \ 'r': 'resource', + \ 'i': 'include', + \ 'v': 'variable', + \} + let g:tagbar_type_puppet.scope2kind = { + \ 'definition' : 'd', + \ 'class' : 'c', + \ 'resource' : 'r', + \ 'include' : 'i', + \ 'variable' : 'v', + \} +endif + +let g:tagbar_type_puppet.deffile = puppet#ctags#OptionFile() + |