diff options
| author | Mitermayer Reis <mitermayer.reis@gmail.com> | 2018-11-05 14:08:30 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-05 14:08:30 -0800 |
| commit | 780632bbb02e5335d239de262df9d79fa762e71b (patch) | |
| tree | 8e078556173c0ce45087d7ea4978ce59defbf4db | |
| parent | 2f9256177584ea5e04ea67b6aa8758a5ce56fa71 (diff) | |
| parent | 52c02ba251050bb1caeba0284a535545ab541f38 (diff) | |
| download | vim-prettier-780632bbb02e5335d239de262df9d79fa762e71b.tar.xz | |
Merge pull request #150 from bracki/yaml-support
Add YAML support
| -rw-r--r-- | .travis.yml | 3 | ||||
| -rw-r--r-- | ftdetect/yaml.vim | 1 | ||||
| -rw-r--r-- | ftplugin/yaml.vim | 10 |
3 files changed, 13 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index 1f07db3..a709b20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ --- language: python -dist: precise +python: + - "3.6" install: - pip install enum34 pathlib typing vim-vint script: diff --git a/ftdetect/yaml.vim b/ftdetect/yaml.vim new file mode 100644 index 0000000..ecad6aa --- /dev/null +++ b/ftdetect/yaml.vim @@ -0,0 +1 @@ +autocmd BufNewFile,BufReadPost *.yaml,*.yml setfiletype yaml diff --git a/ftplugin/yaml.vim b/ftplugin/yaml.vim new file mode 100644 index 0000000..ce67a09 --- /dev/null +++ b/ftplugin/yaml.vim @@ -0,0 +1,10 @@ +let b:prettier_ft_default_args = { + \ 'parser': 'yaml', + \ } + +augroup Prettier + autocmd! + if g:prettier#autoformat + autocmd BufWritePre *.yaml call prettier#Autoformat() + endif +augroup end |
