mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-21 10:23:44 +08:00
27 lines
654 B
VimL
27 lines
654 B
VimL
function! neoformat#formatters#php#enabled() abort
|
|
return ['phpbeautifier', 'phpcsfixer', 'phpcbf']
|
|
endfunction
|
|
|
|
function! neoformat#formatters#php#phpbeautifier() abort
|
|
return {
|
|
\ 'exe': 'php_beautifier',
|
|
\ }
|
|
endfunction
|
|
|
|
function! neoformat#formatters#php#phpcsfixer() abort
|
|
return {
|
|
\ 'exe': 'php-cs-fixer',
|
|
\ 'args': ['fix', '-q'],
|
|
\ 'replace': 1,
|
|
\ }
|
|
endfunction
|
|
|
|
function! neoformat#formatters#php#phpcbf() abort
|
|
return {
|
|
\ 'exe': 'phpcbf',
|
|
\ 'stdin': 1,
|
|
\ 'args': ['-'],
|
|
\ 'valid_exit_codes': [0,1],
|
|
\ }
|
|
endfunction
|