aboutsummaryrefslogtreecommitdiff
path: root/ftplugin/lua.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/lua.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/lua.vim')
-rw-r--r--ftplugin/lua.vim10
1 files changed, 10 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