diff options
| -rw-r--r-- | ftdetect/lua.vim | 1 | ||||
| -rw-r--r-- | ftdetect/php.vim | 1 | ||||
| -rw-r--r-- | ftdetect/python.vim | 1 | ||||
| -rw-r--r-- | ftdetect/swift.vim | 1 | ||||
| -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 | ||||
| -rw-r--r-- | package.json | 4 |
9 files changed, 48 insertions, 0 deletions
diff --git a/ftdetect/lua.vim b/ftdetect/lua.vim new file mode 100644 index 0000000..b59148c --- /dev/null +++ b/ftdetect/lua.vim @@ -0,0 +1 @@ +autocmd BufNewFile,BufReadPost *.lua setfiletype lua diff --git a/ftdetect/php.vim b/ftdetect/php.vim new file mode 100644 index 0000000..1e3236f --- /dev/null +++ b/ftdetect/php.vim @@ -0,0 +1 @@ +autocmd BufNewFile,BufReadPost *.php setfiletype php diff --git a/ftdetect/python.vim b/ftdetect/python.vim new file mode 100644 index 0000000..a33fa5d --- /dev/null +++ b/ftdetect/python.vim @@ -0,0 +1 @@ +autocmd BufNewFile,BufReadPost *.python setfiletype python diff --git a/ftdetect/swift.vim b/ftdetect/swift.vim new file mode 100644 index 0000000..af59e95 --- /dev/null +++ b/ftdetect/swift.vim @@ -0,0 +1 @@ +autocmd BufNewFile,BufReadPost *.swift setfiletype swift 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 diff --git a/package.json b/package.json index cc35f7c..fc61873 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,10 @@ "url": "git://github.com/prettier/vim-prettier.git" }, "dependencies": { + "@prettier/plugin-lua": "0.0.1", + "@prettier/plugin-php": "^0.9.0", + "@prettier/plugin-python": "prettier/plugin-python", + "@prettier/plugin-swift": "prettier/plugin-swift", "prettier": "^1.10.2" } } |
