aboutsummaryrefslogtreecommitdiff
path: root/ftplugin/php.vim
diff options
context:
space:
mode:
authorMitermayer Reis <mitermayer.reis@gmail.com>2018-11-05 14:34:16 -0800
committerGitHub <noreply@github.com>2018-11-05 14:34:16 -0800
commitc61d6ecce37e04e4257e1f4a0ec3c53cdf972ae5 (patch)
tree545847ceded5f9c3ef73d28dc9e73d41898713e2 /ftplugin/php.vim
parentf84a45f6f1332db9f7a0579214e76c207508f987 (diff)
parentccc58c21190c563128fe0c2eac28858790d68393 (diff)
downloadvim-prettier-c61d6ecce37e04e4257e1f4a0ec3c53cdf972ae5.tar.xz
Merge pull request #155 from prettier/adding-pluggin-support
Rebasing vim-prettier plugin Pull Request 120 to 1.0 branch
Diffstat (limited to 'ftplugin/php.vim')
-rw-r--r--ftplugin/php.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/ftplugin/php.vim b/ftplugin/php.vim
new file mode 100644
index 0000000..92e3fc2
--- /dev/null
+++ b/ftplugin/php.vim
@@ -0,0 +1,10 @@
+let b:prettier_ft_default_args = {
+ \ 'parser': 'php',
+ \ }
+
+augroup Prettier
+ autocmd!
+ if g:prettier#autoformat
+ autocmd BufWritePre *.php call prettier#Autoformat()
+ endif
+augroup end