aboutsummaryrefslogtreecommitdiff
path: root/ftplugin/python.vim
diff options
context:
space:
mode:
authormitermayer <mitermayer.reis@gmail.com>2018-11-05 13:17:20 -0800
committermitermayer <mitermayer.reis@gmail.com>2019-08-25 21:14:06 -0700
commit2536a82999effdf6509df606795ed51404d204c9 (patch)
treed5e025aecf2448ead8c939255a1bae758f7ea92c /ftplugin/python.vim
parent4177c919e7f7eb33855e118c4a85571af1bd9a42 (diff)
downloadvim-prettier-2536a82999effdf6509df606795ed51404d204c9.tar.xz
Rebasing vim-prettier plugin Pull Request 120 to 1.0 branch
This is a rebase of https://github.com/prettier/vim-prettier/pull/120/files
Diffstat (limited to 'ftplugin/python.vim')
-rw-r--r--ftplugin/python.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/ftplugin/python.vim b/ftplugin/python.vim
new file mode 100644
index 0000000..ec76040
--- /dev/null
+++ b/ftplugin/python.vim
@@ -0,0 +1,10 @@
+let b:prettier_ft_default_args = {
+ \ 'parser': 'python',
+ \ }
+
+augroup Prettier
+ autocmd!
+ if g:prettier#autoformat
+ autocmd BufWritePre *.py call prettier#Autoformat()
+ endif
+augroup end