Update vim-puppet source to voxpupuli/vim-puppet, closes #115

This commit is contained in:
Adam Stankiewicz 2016-05-02 10:48:28 +02:00
parent 905031eb95
commit 5529a5e8e2
No known key found for this signature in database
GPG Key ID: A62480DCEAC884DF
5 changed files with 13 additions and 15 deletions

View File

@ -78,7 +78,7 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
- [php](https://github.com/StanAngeloff/php.vim) (syntax) - [php](https://github.com/StanAngeloff/php.vim) (syntax)
- [powershell](https://github.com/Persistent13/vim-ps1) (syntax, indent, ftplugin, ftdetect) - [powershell](https://github.com/Persistent13/vim-ps1) (syntax, indent, ftplugin, ftdetect)
- [protobuf](https://github.com/uarun/vim-protobuf) (syntax, ftdetect) - [protobuf](https://github.com/uarun/vim-protobuf) (syntax, ftdetect)
- [puppet](https://github.com/rodjek/vim-puppet) (syntax, indent, ftplugin, ftdetect) - [puppet](https://github.com/voxpupuli/vim-puppet) (syntax, indent, ftplugin, ftdetect)
- [python](https://github.com/mitsuhiko/vim-python-combined) (syntax, indent) - [python](https://github.com/mitsuhiko/vim-python-combined) (syntax, indent)
- [qml](https://github.com/peterhoeg/vim-qml) (syntax, indent, ftplugin, ftdetect) - [qml](https://github.com/peterhoeg/vim-qml) (syntax, indent, ftplugin, ftdetect)
- [r-lang](https://github.com/vim-scripts/R.vim) (syntax, ftplugin) - [r-lang](https://github.com/vim-scripts/R.vim) (syntax, ftplugin)

2
build
View File

@ -149,7 +149,7 @@ PACKS="
php:StanAngeloff/php.vim php:StanAngeloff/php.vim
powershell:Persistent13/vim-ps1 powershell:Persistent13/vim-ps1
protobuf:uarun/vim-protobuf protobuf:uarun/vim-protobuf
puppet:rodjek/vim-puppet puppet:voxpupuli/vim-puppet
python:mitsuhiko/vim-python-combined python:mitsuhiko/vim-python-combined
qml:peterhoeg/vim-qml qml:peterhoeg/vim-qml
r-lang:vim-scripts/R.vim r-lang:vim-scripts/R.vim

View File

@ -6,5 +6,6 @@ setl sw=2
setl et setl et
setl keywordprg=puppet\ describe\ --providers setl keywordprg=puppet\ describe\ --providers
setl iskeyword=-,:,@,48-57,_,192-255 setl iskeyword=-,:,@,48-57,_,192-255
setl cms=#\ %s
endif endif

View File

@ -53,11 +53,7 @@ function! GetPuppetIndent()
let pline = getline(pnum) let pline = getline(pnum)
let ind = indent(pnum) let ind = indent(pnum)
if pline =~ '^\s*#' if pline =~ '\({\|\[\|(\|:\)\s*\(#.*\)\?$'
return ind
endif
if pline =~ '\({\|\[\|(\|:\)$'
let ind += &sw let ind += &sw
elseif pline =~ ';$' && pline !~ '[^:]\+:.*[=+]>.*' elseif pline =~ ';$' && pline !~ '[^:]\+:.*[=+]>.*'
let ind -= &sw let ind -= &sw

View File

@ -18,16 +18,17 @@ elseif exists("b:current_syntax")
finish finish
endif endif
" match class/definition/node declarations " match class/definition/node declarations/application
syn region puppetDefine start="^\s*\(class\|define\|node\)\s" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments,puppetNodeRe,@NoSpell syn region puppetDefine start="^\s*\(class\|define\|node\|application\)\s" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments,puppetNodeRe,@NoSpell
syn keyword puppetDefType class define node inherits contained syn keyword puppetDefType class define node inherits application contained
syn region puppetDefArguments start="(" end=")" contained contains=puppetArgument,puppetString,puppetComment,puppetMultilineComment syn region puppetDefArguments start="(" end=")" contained contains=puppetArgument,puppetString,puppetComment,puppetMultilineComment,puppetDataTypes
syn match puppetArgument "\w\+" contained syn match puppetArgument "\w\+" contained
syn match puppetArgument "\$\w\+" contained syn match puppetArgument "\$\w\+" contained
syn match puppetArgument "'[^']+'" contained syn match puppetArgument "'[^']+'" contained
syn match puppetArgument '"[^"]+"' contained syn match puppetArgument '"[^"]+"' contained
syn match puppetDefName "\w\+" contained syn match puppetDefName "\w\+" contained
syn match puppetNodeRe "/.*/" contained syn match puppetNodeRe "/.*/" contained
syn keyword puppetDataTypes String Integer Float Numeric Boolean Array Hash Regexp Undef Default Resource Class Scalar Collection Variant Data Pattern Enum Tuple Struct Optional Catalogentry Type Any Callable
" match 'foo' in 'class foo { ...' " match 'foo' in 'class foo { ...'
" match 'foo::bar' in 'class foo::bar { ...' " match 'foo::bar' in 'class foo::bar { ...'
@ -42,7 +43,7 @@ syn match puppetTypeDefault "[A-Z]\w*" contained
syn match puppetParam "\w\+\s*\(=\|+\)>" contains=puppetTypeRArrow,puppetParamName syn match puppetParam "\w\+\s*\(=\|+\)>" contains=puppetTypeRArrow,puppetParamName
syn match puppetParamRArrow "\(=\|+\)>" contained syn match puppetParamRArrow "\(=\|+\)>" contained
syn match puppetParamName "\w\+" contained contains=@NoSpell syn match puppetParamName "\w\+" contained contains=@NoSpell
syn match puppetVariable "$\(\(\(::\)\?\w\+\)\+\|{\(\(::\)\?\w\+\)\+}\)" syn match puppetVariable "$\(\(::\)\?\w\+\|{\(::\)\?\w\+}\)"
syn match puppetParen "(" syn match puppetParen "("
syn match puppetParen ")" syn match puppetParen ")"
syn match puppetBrace "{" syn match puppetBrace "{"
@ -57,7 +58,7 @@ syn match puppetBrack "|>"
" don't match 'bar' in 'foo => bar' " don't match 'bar' in 'foo => bar'
syn match puppetParam "\w\+\s*[=+]>\s*[a-z0-9]\+" contains=puppetParamString,puppetParamName syn match puppetParam "\w\+\s*[=+]>\s*[a-z0-9]\+" contains=puppetParamString,puppetParamName
syn match puppetParamString "[=+]>\s*\w\+" contains=puppetParamKeyword,puppetParamSpecial,puppetParamDigits contained syn match puppetParamString "[=+]>\s*\w\+" contains=puppetParamKeyword,puppetParamSpecial,puppetParamDigits contained
syn keyword puppetParamKeyword present absent purged latest installed running stopped mounted unmounted role configured file directory link contained syn keyword puppetParamKeyword present absent purged latest installed running stopped mounted unmounted role configured file directory link on_failure contained
syn keyword puppetParamSpecial true false undef contained syn keyword puppetParamSpecial true false undef contained
syn match puppetParamDigits "[0-9]\+" syn match puppetParamDigits "[0-9]\+"
@ -78,8 +79,8 @@ syn region puppetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pupp
syn match puppetNotVariable "\\$\w\+" contained syn match puppetNotVariable "\\$\w\+" contained
syn match puppetNotVariable "\\${\w\+}" contained syn match puppetNotVariable "\\${\w\+}" contained
syn keyword puppetKeyword import inherits include require contains syn keyword puppetKeyword import inherits include require contain produces
syn keyword puppetControl case default if else elsif syn keyword puppetControl case default if else elsif unless
syn keyword puppetSpecial true false undef syn keyword puppetSpecial true false undef
syn match puppetClass "[A-Za-z0-9_-]\+\(::[A-Za-z0-9_-]\+\)\+" contains=@NoSpell syn match puppetClass "[A-Za-z0-9_-]\+\(::[A-Za-z0-9_-]\+\)\+" contains=@NoSpell