aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml3
-rw-r--r--ftdetect/yaml.vim1
-rw-r--r--ftplugin/yaml.vim10
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