diff options
| author | Mitermayer Reis <mitermayer.reis@gmail.com> | 2018-11-05 14:34:16 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-05 14:34:16 -0800 |
| commit | c61d6ecce37e04e4257e1f4a0ec3c53cdf972ae5 (patch) | |
| tree | 545847ceded5f9c3ef73d28dc9e73d41898713e2 /ftplugin | |
| parent | f84a45f6f1332db9f7a0579214e76c207508f987 (diff) | |
| parent | ccc58c21190c563128fe0c2eac28858790d68393 (diff) | |
| download | vim-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')
| -rw-r--r-- | ftplugin/lua.vim | 10 | ||||
| -rw-r--r-- | ftplugin/php.vim | 10 | ||||
| -rw-r--r-- | ftplugin/python.vim | 10 | ||||
| -rw-r--r-- | ftplugin/swift.vim | 10 |
4 files changed, 40 insertions, 0 deletions
diff --git a/ftplugin/lua.vim b/ftplugin/lua.vim new file mode 100644 index 0000000..8a58bde --- /dev/null +++ b/ftplugin/lua.vim @@ -0,0 +1,10 @@ +let b:prettier_ft_default_args = { + \ 'parser': 'lua', + \ } + +augroup Prettier + autocmd! + if g:prettier#autoformat + autocmd BufWritePre *.lua call prettier#Autoformat() + endif +augroup end 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 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 diff --git a/ftplugin/swift.vim b/ftplugin/swift.vim new file mode 100644 index 0000000..a6753d5 --- /dev/null +++ b/ftplugin/swift.vim @@ -0,0 +1,10 @@ +let b:prettier_ft_default_args = { + \ 'parser': 'swift', + \ } + +augroup Prettier + autocmd! + if g:prettier#autoformat + autocmd BufWritePre *.swift call prettier#Autoformat() + endif +augroup end |
