Change powershell provider to PProvost, closes #177
This commit is contained in:
parent
8002795088
commit
462bb76e06
@ -86,7 +86,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
|||||||
- [pgsql](https://github.com/exu/pgsql.vim) (syntax, ftdetect)
|
- [pgsql](https://github.com/exu/pgsql.vim) (syntax, ftdetect)
|
||||||
- [php](https://github.com/StanAngeloff/php.vim) (syntax)
|
- [php](https://github.com/StanAngeloff/php.vim) (syntax)
|
||||||
- [plantuml](https://github.com/aklt/plantuml-syntax) (syntax, indent, ftplugin, ftdetect)
|
- [plantuml](https://github.com/aklt/plantuml-syntax) (syntax, indent, ftplugin, ftdetect)
|
||||||
- [powershell](https://github.com/Persistent13/vim-ps1) (syntax, indent, ftplugin, ftdetect)
|
- [powershell](https://github.com/PProvost/vim-ps1) (syntax, indent, ftplugin, ftdetect)
|
||||||
- [protobuf](https://github.com/uarun/vim-protobuf) (syntax, indent, ftdetect)
|
- [protobuf](https://github.com/uarun/vim-protobuf) (syntax, indent, ftdetect)
|
||||||
- [pug](https://github.com/digitaltoad/vim-pug) (syntax, indent, ftplugin, ftdetect)
|
- [pug](https://github.com/digitaltoad/vim-pug) (syntax, indent, ftplugin, ftdetect)
|
||||||
- [puppet](https://github.com/voxpupuli/vim-puppet) (syntax, indent, ftplugin, ftdetect)
|
- [puppet](https://github.com/voxpupuli/vim-puppet) (syntax, indent, ftplugin, ftdetect)
|
||||||
|
2
build
2
build
@ -159,7 +159,7 @@ PACKS="
|
|||||||
pgsql:exu/pgsql.vim
|
pgsql:exu/pgsql.vim
|
||||||
php:StanAngeloff/php.vim
|
php:StanAngeloff/php.vim
|
||||||
plantuml:aklt/plantuml-syntax
|
plantuml:aklt/plantuml-syntax
|
||||||
powershell:Persistent13/vim-ps1
|
powershell:PProvost/vim-ps1
|
||||||
protobuf:uarun/vim-protobuf
|
protobuf:uarun/vim-protobuf
|
||||||
pug:digitaltoad/vim-pug
|
pug:digitaltoad/vim-pug
|
||||||
puppet:voxpupuli/vim-puppet
|
puppet:voxpupuli/vim-puppet
|
||||||
|
@ -658,6 +658,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') ==
|
|||||||
au BufNewFile,BufRead *.ps1 set ft=ps1
|
au BufNewFile,BufRead *.ps1 set ft=ps1
|
||||||
au BufNewFile,BufRead *.psd1 set ft=ps1
|
au BufNewFile,BufRead *.psd1 set ft=ps1
|
||||||
au BufNewFile,BufRead *.psm1 set ft=ps1
|
au BufNewFile,BufRead *.psm1 set ft=ps1
|
||||||
|
au BufNewFile,BufRead *.pssc set ft=ps1
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -673,7 +674,6 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') ==
|
|||||||
|
|
||||||
au BufNewFile,BufRead *.ps1xml set ft=ps1xml
|
au BufNewFile,BufRead *.ps1xml set ft=ps1xml
|
||||||
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" ftdetect/pug.vim
|
" ftdetect/pug.vim
|
||||||
@ -1018,4 +1018,19 @@ au BufNewFile,BufRead *.vue setf vue.html.javascript.css
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" ftdetect/xml.vim
|
||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') == -1
|
||||||
|
|
||||||
|
" Vim ftdetect plugin file
|
||||||
|
" Language: Windows PowerShell
|
||||||
|
" Maintainer: Peter Provost <peter@provost.org>
|
||||||
|
" Version: 2.10
|
||||||
|
" Project Repository: https://github.com/PProvost/vim-ps1
|
||||||
|
" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327
|
||||||
|
|
||||||
|
au BufNewFile,BufRead *.cdxml set ft=xml
|
||||||
|
au BufNewFile,BufRead *.psc1 set ft=xml
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
augroup END
|
augroup END
|
||||||
|
@ -10,6 +10,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') ==
|
|||||||
" The following settings are available for tuning syntax highlighting:
|
" The following settings are available for tuning syntax highlighting:
|
||||||
" let ps1_nofold_blocks = 1
|
" let ps1_nofold_blocks = 1
|
||||||
" let ps1_nofold_sig = 1
|
" let ps1_nofold_sig = 1
|
||||||
|
" let ps1_nofold_region = 1
|
||||||
|
|
||||||
" Compatible VIM syntax file start
|
" Compatible VIM syntax file start
|
||||||
if version < 600
|
if version < 600
|
||||||
@ -18,6 +19,9 @@ elseif exists("b:current_syntax")
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Operators contain dashes
|
||||||
|
setlocal iskeyword+=-
|
||||||
|
|
||||||
" PowerShell doesn't care about case
|
" PowerShell doesn't care about case
|
||||||
syn case ignore
|
syn case ignore
|
||||||
|
|
||||||
@ -25,7 +29,7 @@ syn case ignore
|
|||||||
syn sync minlines=100
|
syn sync minlines=100
|
||||||
|
|
||||||
" Certain tokens can't appear at the top level of the document
|
" Certain tokens can't appear at the top level of the document
|
||||||
syn cluster ps1NotTop contains=@ps1Comment,ps1CDocParam,ps1Function
|
syn cluster ps1NotTop contains=@ps1Comment,ps1CDocParam,ps1FunctionDeclaration
|
||||||
|
|
||||||
" Comments and special comment words
|
" Comments and special comment words
|
||||||
syn keyword ps1CommentTodo TODO FIXME XXX TBD HACK NOTE contained
|
syn keyword ps1CommentTodo TODO FIXME XXX TBD HACK NOTE contained
|
||||||
@ -42,10 +46,9 @@ syn match ps1Repeat /\<foreach\>/ nextgroup=ps1Block skipwhite
|
|||||||
syn match ps1Keyword /\<while\>/ nextgroup=ps1Block skipwhite
|
syn match ps1Keyword /\<while\>/ nextgroup=ps1Block skipwhite
|
||||||
syn match ps1Keyword /\<where\>/ nextgroup=ps1Block skipwhite
|
syn match ps1Keyword /\<where\>/ nextgroup=ps1Block skipwhite
|
||||||
|
|
||||||
syn keyword ps1Exception begin process end exit
|
syn keyword ps1Exception begin process end exit inlinescript parallel sequence
|
||||||
syn keyword ps1Keyword try catch finally throw
|
syn keyword ps1Keyword try catch finally throw
|
||||||
syn keyword ps1Keyword return filter in trap param data dynamicparam
|
syn keyword ps1Keyword return filter in trap param data dynamicparam
|
||||||
syn match ps1Keyword /&/
|
|
||||||
syn keyword ps1Constant $true $false $null
|
syn keyword ps1Constant $true $false $null
|
||||||
syn match ps1Constant +\$?+
|
syn match ps1Constant +\$?+
|
||||||
syn match ps1Constant +\$_+
|
syn match ps1Constant +\$_+
|
||||||
@ -55,50 +58,70 @@ syn match ps1Constant +\$^+
|
|||||||
" Keywords reserved for future use
|
" Keywords reserved for future use
|
||||||
syn keyword ps1Keyword class define from using var
|
syn keyword ps1Keyword class define from using var
|
||||||
|
|
||||||
" Functions and Cmdlets
|
" Function declarations
|
||||||
syn match ps1Cmdlet /\w\+-\w\+/
|
syn keyword ps1Keyword function nextgroup=ps1FunctionDeclaration skipwhite
|
||||||
syn keyword ps1Keyword function nextgroup=ps1Function skipwhite
|
syn keyword ps1Keyword filter nextgroup=ps1FunctionDeclaration skipwhite
|
||||||
syn keyword ps1Keyword filter nextgroup=ps1Function skipwhite
|
syn keyword ps1Keyword workflow nextgroup=ps1FunctionDeclaration skipwhite
|
||||||
syn match ps1Function /\w\+-*\w*/ contained
|
syn keyword ps1Keyword configuration nextgroup=ps1FunctionDeclaration skipwhite
|
||||||
|
syn keyword ps1Keyword class nextgroup=ps1FunctionDeclaration skipwhite
|
||||||
|
syn keyword ps1Keyword enum nextgroup=ps1FunctionDeclaration skipwhite
|
||||||
|
syn match ps1FunctionDeclaration /\w\+\(-\w\+\)*/ contained
|
||||||
|
|
||||||
|
" Function invocations
|
||||||
|
syn match ps1FunctionInvocation /\w\+\(-\w\+\)\+/
|
||||||
|
|
||||||
" Type declarations
|
" Type declarations
|
||||||
syn match ps1Type /\[[a-z0-9_:.]\+\(\[\]\)\?\]/
|
syn match ps1Type /\[[a-z_][a-z0-9_.,\[\]]\+\]/
|
||||||
syn match ps1StandaloneType /[a-z0-9_.]\+/ contained
|
|
||||||
syn keyword ps1Scope global local private script contained
|
|
||||||
|
|
||||||
" Variables and other user defined items
|
" Variable references
|
||||||
syn match ps1Variable /\$\w\+/
|
syn match ps1ScopeModifier /\(global:\|local:\|private:\|script:\)/ contained
|
||||||
syn match ps1Variable /\${\w\+:\\\w\+}/
|
syn match ps1Variable /\$\w\+\(:\w\+\)\?/ contains=ps1ScopeModifier
|
||||||
syn match ps1ScopedVariable /\$\w\+:\w\+/ contains=ps1Scope
|
syn match ps1Variable /\${\w\+\(:\w\+\)\?}/ contains=ps1ScopeModifier
|
||||||
syn match ps1VariableName /\w\+/ contained
|
|
||||||
|
|
||||||
" Operators all start w/ dash
|
" Operators
|
||||||
syn match ps1OperatorStart /-c\?/ nextgroup=ps1Operator
|
syn keyword ps1Operator -eq -ne -ge -gt -lt -le -like -notlike -match -notmatch -replace -split -contains -notcontains
|
||||||
syn keyword ps1Operator eq ne ge gt lt le like notlike match notmatch replace split /contains/ notcontains contained
|
syn keyword ps1Operator -ieq -ine -ige -igt -ile -ilt -ilike -inotlike -imatch -inotmatch -ireplace -isplit -icontains -inotcontains
|
||||||
syn keyword ps1Operator ieq ine ige igt ile ilt ilike inotlike imatch inotmatch ireplace isplit icontains inotcontains contained
|
syn keyword ps1Operator -ceq -cne -cge -cgt -clt -cle -clike -cnotlike -cmatch -cnotmatch -creplace -csplit -ccontains -cnotcontains
|
||||||
syn keyword ps1Operator ceq cne cge cgt clt cle clike cnotlike cmatch cnotmatch creplace csplit ccontains cnotcontains contained
|
syn keyword ps1Operator -in -notin
|
||||||
syn keyword ps1Operator is isnot as join contained
|
syn keyword ps1Operator -is -isnot -as -join
|
||||||
syn keyword ps1Operator and or not xor band bor bnot bxor contained
|
syn keyword ps1Operator -and -or -not -xor -band -bor -bnot -bxor
|
||||||
syn keyword ps1Operator f contained
|
syn keyword ps1Operator -f
|
||||||
|
syn match ps1Operator /!/
|
||||||
|
syn match ps1Operator /=/
|
||||||
|
syn match ps1Operator /+=/
|
||||||
|
syn match ps1Operator /-=/
|
||||||
|
syn match ps1Operator /\*=/
|
||||||
|
syn match ps1Operator /\/=/
|
||||||
|
syn match ps1Operator /%=/
|
||||||
|
syn match ps1Operator /+/
|
||||||
|
syn match ps1Operator /-\(\s\|\d\|\.\|\$\|(\)\@=/
|
||||||
|
syn match ps1Operator /\*/
|
||||||
|
syn match ps1Operator /\//
|
||||||
|
syn match ps1Operator /|/
|
||||||
|
syn match ps1Operator /%/
|
||||||
|
syn match ps1Operator /&/
|
||||||
|
syn match ps1Operator /::/
|
||||||
|
syn match ps1Operator /,/
|
||||||
|
syn match ps1Operator /\(^\|\s\)\@<=\. \@=/
|
||||||
|
|
||||||
" Regular Strings
|
" Regular Strings
|
||||||
" These aren't precisely correct and could use some work
|
" These aren't precisely correct and could use some work
|
||||||
syn region ps1String start=/"/ skip=/`"/ end=/"/ contains=@ps1StringSpecial
|
syn region ps1String start=/"/ skip=/`"/ end=/"/ contains=@ps1StringSpecial,@Spell
|
||||||
syn region ps1String start=/'/ skip=/''/ end=/'/
|
syn region ps1String start=/'/ skip=/''/ end=/'/
|
||||||
|
|
||||||
" Here-Strings
|
" Here-Strings
|
||||||
syn region ps1String start=/@"$/ end=/^"@/ contains=@ps1StringSpecial
|
syn region ps1String start=/@"$/ end=/^"@/ contains=@ps1StringSpecial,@Spell
|
||||||
syn region ps1String start=/@'$/ end=/^'@/
|
syn region ps1String start=/@'$/ end=/^'@/
|
||||||
|
|
||||||
" Interpolation
|
" Interpolation
|
||||||
syn match ps1Escape /`./ contained
|
syn match ps1Escape /`./
|
||||||
syn region ps1Interpolation matchgroup=ps1InterpolationDelimiter start="$(" end=")" contained contains=ALLBUT,@ps1NotTop
|
syn region ps1Interpolation matchgroup=ps1InterpolationDelimiter start="$(" end=")" contained contains=ALLBUT,@ps1NotTop
|
||||||
syn region ps1NestedParentheses start="(" skip="\\\\\|\\)" matchgroup=ps1Interpolation end=")" transparent contained
|
syn region ps1NestedParentheses start="(" skip="\\\\\|\\)" matchgroup=ps1Interpolation end=")" transparent contained
|
||||||
syn cluster ps1StringSpecial contains=ps1Escape,ps1Interpolation,ps1Variable,ps1Boolean,ps1Constant,ps1BuiltIn
|
syn cluster ps1StringSpecial contains=ps1Escape,ps1Interpolation,ps1Variable,ps1Boolean,ps1Constant,ps1BuiltIn,@Spell
|
||||||
|
|
||||||
" Numbers
|
" Numbers
|
||||||
syn match ps1Number "\<\(0[xX]\x\+\|\d\+\)\([KMGTP][B]\)\=\>"
|
syn match ps1Number "\(\<\|-\)\@<=\(0[xX]\x\+\|\d\+\)\([KMGTP][B]\)\=\(\>\|-\)\@="
|
||||||
syn match ps1Number "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[dD]\="
|
syn match ps1Number "\(\(\<\|-\)\@<=\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[dD]\="
|
||||||
syn match ps1Number "\<\d\+[eE][-+]\=\d\+[dD]\=\>"
|
syn match ps1Number "\<\d\+[eE][-+]\=\d\+[dD]\=\>"
|
||||||
syn match ps1Number "\<\d\+\([eE][-+]\=\d\+\)\=[dD]\>"
|
syn match ps1Number "\<\d\+\([eE][-+]\=\d\+\)\=[dD]\>"
|
||||||
|
|
||||||
@ -115,6 +138,10 @@ if !exists('g:ps1_nofold_blocks')
|
|||||||
syn region ps1Block start=/{/ end=/}/ transparent fold
|
syn region ps1Block start=/{/ end=/}/ transparent fold
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !exists('g:ps1_nofold_region')
|
||||||
|
syn region ps1Region start=/#region/ end=/#endregion/ transparent fold keepend extend
|
||||||
|
endif
|
||||||
|
|
||||||
if !exists('g:ps1_nofold_sig')
|
if !exists('g:ps1_nofold_sig')
|
||||||
syn region ps1Signature start=/# SIG # Begin signature block/ end=/# SIG # End signature block/ transparent fold
|
syn region ps1Signature start=/# SIG # Begin signature block/ end=/# SIG # End signature block/ transparent fold
|
||||||
endif
|
endif
|
||||||
@ -130,23 +157,21 @@ if version >= 508 || !exists("did_ps1_syn_inits")
|
|||||||
|
|
||||||
HiLink ps1Number Number
|
HiLink ps1Number Number
|
||||||
HiLink ps1Block Block
|
HiLink ps1Block Block
|
||||||
|
HiLink ps1Region Region
|
||||||
HiLink ps1Exception Exception
|
HiLink ps1Exception Exception
|
||||||
HiLink ps1Constant Constant
|
HiLink ps1Constant Constant
|
||||||
HiLink ps1String String
|
HiLink ps1String String
|
||||||
HiLink ps1Escape SpecialChar
|
HiLink ps1Escape SpecialChar
|
||||||
HiLink ps1InterpolationDelimiter Delimiter
|
HiLink ps1InterpolationDelimiter Delimiter
|
||||||
HiLink ps1Conditional Conditional
|
HiLink ps1Conditional Conditional
|
||||||
HiLink ps1Function Function
|
HiLink ps1FunctionDeclaration Function
|
||||||
|
HiLink ps1FunctionInvocation Function
|
||||||
HiLink ps1Variable Identifier
|
HiLink ps1Variable Identifier
|
||||||
HiLink ps1ScopedVariable Identifier
|
|
||||||
HiLink ps1VariableName Identifier
|
|
||||||
HiLink ps1Boolean Boolean
|
HiLink ps1Boolean Boolean
|
||||||
HiLink ps1Constant Constant
|
HiLink ps1Constant Constant
|
||||||
HiLink ps1BuiltIn StorageClass
|
HiLink ps1BuiltIn StorageClass
|
||||||
HiLink ps1Type Type
|
HiLink ps1Type Type
|
||||||
HiLink ps1Scope Type
|
HiLink ps1ScopeModifier StorageClass
|
||||||
HiLink ps1StandaloneType Type
|
|
||||||
HiLink ps1Number Number
|
|
||||||
HiLink ps1Comment Comment
|
HiLink ps1Comment Comment
|
||||||
HiLink ps1CommentTodo Todo
|
HiLink ps1CommentTodo Todo
|
||||||
HiLink ps1CommentDoc Tag
|
HiLink ps1CommentDoc Tag
|
||||||
@ -156,11 +181,9 @@ if version >= 508 || !exists("did_ps1_syn_inits")
|
|||||||
HiLink ps1RepeatAndCmdlet Repeat
|
HiLink ps1RepeatAndCmdlet Repeat
|
||||||
HiLink ps1Keyword Keyword
|
HiLink ps1Keyword Keyword
|
||||||
HiLink ps1KeywordAndCmdlet Keyword
|
HiLink ps1KeywordAndCmdlet Keyword
|
||||||
HiLink ps1Cmdlet Statement
|
|
||||||
delcommand HiLink
|
delcommand HiLink
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let b:current_syntax = "ps1"
|
let b:current_syntax = "ps1"
|
||||||
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user