clifford-github / sublime-ansible

Syntax highlighting for Ansible
MIT License
135 stars 11 forks source link

Coloring in Jinja expressions seems off #37

Closed Nothing4You closed 1 year ago

Nothing4You commented 1 year ago

f83b56aa0a236264daa291c24f586fdcb2bedee4

---

- debug:
    msg: "{{ foo }}"

- debug:
    msg: "{{ foo[bar]['baz'] }}"

- debug:
    msg: "{{ lookup('plugin_name', 'arg_value') | selectattr('foo', 'defined') }}"
image

I'm not sure what I'd expect this to look like but this seems inconsistent and doesn't look right, especially with keywords (in quotes) being highlighted.

Nothing4You commented 1 year ago

The keyword aspect seems to apply everywhere, would it make sense to restrict them to when and inside jinja expressions (without extra quotes)?

---

- debug:
    msg: what else could happen
  when:
    - "foo" == "bar"
    - "foo" == "else"
image
killua99 commented 1 year ago

I turn off the keyword meanwhile I find a better way to catch them when they make sense

killua99 commented 1 year ago

A new release tag is in place, feel free to install it via control package or update your local git repo with git pull or zip download.