Change provider for puppet, closes #424

This commit is contained in:
Adam Stankiewicz
2019-09-04 16:04:21 +02:00
parent cdd6d73e39
commit 933e42ea1f
10 changed files with 427 additions and 435 deletions

View File

@@ -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()