1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-21 10:23:44 +08:00
SpaceVim/bundle/neoformat/autoload/neoformat/formatters/ps1.vim
2021-06-18 22:42:55 +08:00

21 lines
626 B
VimL

function! neoformat#formatters#ps1#enabled() abort
return ['PSScriptAnalyzer', 'PowerShellBeautifier']
endfunction
function! neoformat#formatters#ps1#PowerShellBeautifier() abort
return {
\ 'exe' : 'Edit-DTWBeautifyScript',
\ 'args' : ["-IndentType FourSpaces", "-StandardOutput"],
\ 'stdin' : 0,
\ }
endfunction
function! neoformat#formatters#ps1#PSScriptAnalyzer() abort
return {
\ 'exe' : 'Invoke-Formatter',
\ 'args' : ['-ScriptDefinition (Get-Content ' . expand('%') . ' -Raw)'],
\ 'stdin' : 0,
\ 'no_append' : 1,
\ }
endfunction