summaryrefslogtreecommitdiffstats
path: root/syntax/ansible.vim
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/ansible.vim')
-rw-r--r--syntax/ansible.vim43
1 files changed, 29 insertions, 14 deletions
diff --git a/syntax/ansible.vim b/syntax/ansible.vim
index 70f59021..8a10ec59 100644
--- a/syntax/ansible.vim
+++ b/syntax/ansible.vim
@@ -87,29 +87,44 @@ execute 'syn keyword ansible_debug_keywords debug containedin='.s:yamlKey.' cont
highlight default link ansible_debug_keywords Debug
if exists("g:ansible_extra_keywords_highlight")
- execute 'syn keyword ansible_extra_special_keywords register always_run changed_when failed_when no_log args vars delegate_to ignore_errors containedin='.s:yamlKey.' contained'
- highlight link ansible_extra_special_keywords Statement
+ execute 'syn keyword ansible_extra_special_keywords
+ \ become become_exe become_flags become_method become_user become_pass prompt_l10n
+ \ debugger always_run check_mode diff no_log args tags force_handlers
+ \ vars vars_files vars_prompt delegate_facts delegate_to
+ \ any_errors_fatal ignore_errors ignore_unreachable max_fail_percentage
+ \ connection hosts port remote_user module_defaults
+ \ environment fact_path gather_facts gather_subset gather_timeout
+ \ async poll throttle timeout order run_once serial strategy
+ \ containedin='.s:yamlKey.' contained'
+ if exists("g:ansible_extra_keywords_highlight_group")
+ execute 'highlight link ansible_extra_special_keywords '.g:ansible_extra_keywords_highlight_group
+ else
+ highlight link ansible_extra_special_keywords Structure
+ endif
endif
-execute 'syn keyword ansible_normal_keywords include include_tasks import_tasks until retries delay when only_if become become_user block rescue always notify containedin='.s:yamlKey.' contained'
+execute 'syn keyword ansible_normal_keywords
+ \ include include_role include_tasks include_vars import_role import_playbook import_tasks
+ \ when changed_when failed_when block rescue always notify listen register
+ \ action local_action post_tasks pre_tasks tasks handlers roles collections
+ \ containedin='.s:yamlKey.' contained'
if exists("g:ansible_normal_keywords_highlight")
execute 'highlight link ansible_normal_keywords '.g:ansible_normal_keywords_highlight
else
highlight default link ansible_normal_keywords Statement
endif
-execute 'syn match ansible_with_keywords "\vwith_.+" containedin='.s:yamlKey.' contained'
-if exists("g:ansible_with_keywords_highlight")
- execute 'highlight link ansible_with_keywords '.g:ansible_with_keywords_highlight
-else
- highlight default link ansible_with_keywords Statement
-endif
-
-execute 'syn keyword ansible_with_keywords loop containedin='.s:yamlKey.' contained'
-if exists("g:ansible_with_keywords_highlight")
- execute 'highlight link ansible_with_keywords '.g:ansible_with_keywords_highlight
+execute 'syn keyword ansible_loop_keywords
+ \ loop loop_control until retries delay
+ \ containedin='.s:yamlKey.' contained'
+execute 'syn match ansible_loop_keywords "\vwith_.+" containedin='.s:yamlKey.' contained'
+if exists("g:ansible_loop_keywords_highlight")
+ execute 'highlight link ansible_loop_keywords '.g:ansible_loop_keywords_highlight
+" backward compatibility: ansible_with_keywords_highlight replaced by ansible_loop_keywords_highlight
+elseif exists("g:ansible_with_keywords_highlight")
+ execute 'highlight link ansible_loop_keywords '.g:ansible_with_keywords_highlight
else
- highlight default link ansible_with_keywords Statement
+ highlight default link ansible_loop_keywords Statement
endif
let b:current_syntax = "ansible"