From 8373441047299fbe528dfda528fa01a4971e7d23 Mon Sep 17 00:00:00 2001 From: mitermayer Date: Sat, 15 Feb 2020 08:55:11 +0000 Subject: Adding support for the prettier lua plugin --- ftplugin/lua.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 ftplugin/lua.vim (limited to 'ftplugin') diff --git a/ftplugin/lua.vim b/ftplugin/lua.vim new file mode 100644 index 0000000..e363f6b --- /dev/null +++ b/ftplugin/lua.vim @@ -0,0 +1,10 @@ +let b:prettier_ft_default_args = { + \ 'parser': 'lua', + \ } + +augroup Prettier + autocmd! + if get(g:, 'prettier#autoformat') + autocmd BufWritePre *.lua call prettier#Autoformat() + endif +augroup end -- cgit v1.3