pearofducks / ansible-vim

A vim plugin for syntax highlighting Ansible's common filetypes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Detect column in addition to the equality sign

savchenko opened this issue · comments

Module parameters defined with the column sign are highlighted drastically differently.

Example:

---
- hosts: localhost
  tasks:
    - set_fact:
        - dummy: true
        - teapot: false
    - set_fact: dummy=false, teapot=true
    - debug: msg="{{ dummy, teapot }}"

And here is the highlighted result:
image

Perhaps it would make sense to (optionally) allow the same highlighting style for : and = definitions?

Edit: To clarify - allow column-based definitions to be dimmed the same way as equal-sign-based ones.

@pearofducks ,

I have read the Readme and tried to play with the above-mentioned parameter, but was not able to achieve the behaviour described.

Here is how it looks like:
image

Relevant excerpt from ~/.vimrc:

let g:ansible_unindent_after_newline = 1
let g:ansible_attribute_highlight = 'ad'
let g:ansible_name_highlight = 'd'
let g:ansible_extra_keywords_highlight = 1          

And here is the expected rendering:
adj

Similar to the other bug you filed, that expection isn't possible due to the YAML syntax.