aboutsummaryrefslogtreecommitdiff
path: root/ftplugin
diff options
context:
space:
mode:
authormitermayer <mitermayer.reis@gmail.com>2020-02-15 08:40:18 +0000
committermitermayer <mitermayer.reis@gmail.com>2020-02-15 08:40:18 +0000
commitcdf15c260bf90d5052ec02254c091b966dceb9d9 (patch)
tree4962b0e726c764d2efe4d8cbaf60babb1f4e9e41 /ftplugin
parent23da7f009fd494879c8c95f41127fd56ff5ab4f6 (diff)
downloadvim-prettier-cdf15c260bf90d5052ec02254c091b966dceb9d9.tar.xz
Adding support for prettier ruby plugin
- Update docker container image to be able to run the prettier ruby plugin tests
Diffstat (limited to 'ftplugin')
-rw-r--r--ftplugin/ruby.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/ftplugin/ruby.vim b/ftplugin/ruby.vim
new file mode 100644
index 0000000..c5f62fc
--- /dev/null
+++ b/ftplugin/ruby.vim
@@ -0,0 +1,10 @@
+let b:prettier_ft_default_args = {
+ \ 'parser': 'ruby',
+ \ }
+
+augroup Prettier
+ autocmd!
+ if get(g:, 'prettier#autoformat')
+ autocmd BufWritePre *.ruby call prettier#Autoformat()
+ endif
+augroup end