Fix ansible ftdetect

This commit is contained in:
Adam Stankiewicz
2020-08-25 14:28:44 +02:00
parent 080b8cdc60
commit 94ababe91f
3 changed files with 8 additions and 6 deletions

View File

@@ -1289,15 +1289,15 @@ if index(g:polyglot_disabled, 'ansible') == -1
au BufNewFile,BufRead *.asl set ft=yaml.ansible au BufNewFile,BufRead *.asl set ft=yaml.ansible
au BufNewFile,BufRead *.dsl set ft=yaml.ansible au BufNewFile,BufRead *.dsl set ft=yaml.ansible
au BufNewFile,BufRead group_vars/* set ft=yaml.ansible au BufNewFile,BufRead group_vars/* set ft=yaml.ansible
au BufNewFile,BufRead handlers.*.ya?ml set ft=yaml.ansible au BufNewFile,BufRead handlers.*.y{a,}ml set ft=yaml.ansible
au BufNewFile,BufRead host_vars/* set ft=yaml.ansible au BufNewFile,BufRead host_vars/* set ft=yaml.ansible
au BufNewFile,BufRead local.y{a,}ml set ft=yaml.ansible au BufNewFile,BufRead local.y{a,}ml set ft=yaml.ansible
au BufNewFile,BufRead main.y{a,}ml set ft=yaml.ansible au BufNewFile,BufRead main.y{a,}ml set ft=yaml.ansible
au BufNewFile,BufRead playbook.y{a,}ml set ft=yaml.ansible au BufNewFile,BufRead playbook.y{a,}ml set ft=yaml.ansible
au BufNewFile,BufRead requirements.y{a,}ml set ft=yaml.ansible au BufNewFile,BufRead requirements.y{a,}ml set ft=yaml.ansible
au BufNewFile,BufRead roles.*.ya?ml set ft=yaml.ansible au BufNewFile,BufRead roles.*.y{a,}ml set ft=yaml.ansible
au BufNewFile,BufRead site.y{a,}ml set ft=yaml.ansible au BufNewFile,BufRead site.y{a,}ml set ft=yaml.ansible
au BufNewFile,BufRead tasks.*.ya?ml set ft=yaml.ansible au BufNewFile,BufRead tasks.*.y{a,}ml set ft=yaml.ansible
endif endif
if index(g:polyglot_disabled, 'helm') == -1 if index(g:polyglot_disabled, 'helm') == -1

View File

@@ -1276,11 +1276,11 @@ filetypes:
- "main.y{a,}ml" - "main.y{a,}ml"
- "local.y{a,}ml" - "local.y{a,}ml"
- "requirements.y{a,}ml" - "requirements.y{a,}ml"
- 'tasks.*.y{a,}ml'
- 'roles.*.y{a,}ml'
- 'handlers.*.y{a,}ml'
- 'group_vars/*' - 'group_vars/*'
- 'host_vars/*' - 'host_vars/*'
- 'tasks.*.ya?ml'
- 'roles.*.ya?ml'
- 'handlers.*.ya?ml'
# Helm needs to be after YAML # Helm needs to be after YAML
--- ---
name: helm name: helm

View File

@@ -12,3 +12,5 @@ endfunction
call TestExtension('blade', 'test.blade.php', '') call TestExtension('blade', 'test.blade.php', '')
call TestExtension('yaml.ansible', 'playbook.yml', '') call TestExtension('yaml.ansible', 'playbook.yml', '')
call TestExtension('yaml.ansible', 'host_vars/foobar', '') call TestExtension('yaml.ansible', 'host_vars/foobar', '')
call TestExtension('yaml.ansible', 'handlers.foo.yaml', '')
call TestExtension('yaml.ansible', 'requirements.yaml', '')