# [PackageDev] target_format: plist, ext: tmLanguage
---
name: Ansible
scopeName: source.ansible
fileTypes: []
uuid: 787ae642-b4ae-48b1-94e9-f935bec43a8f

patterns:
- name: comment.line.number-sign.ansible
  match: (?:^ *|\G *)((#).*)
  captures:
    '1': {name: comment.line.number-sign.ansible}
    '2': {name: punctuation.definition.comment.line.ansible}

- name: storage.type.ansible
  match: (\{\{ *[^\{\}]+ *\}\})|(\$\{[^\{\}]+\})

- name: keyword.other.ansible
  match: \- (name\:|include\:) (.*)|(^(- |\s*)\w+\:)
  captures:
    '2': {name: string.quoted.double.ansible}

- name: variable.complex.ansible
  contentName: string.other.ansible
  begin: (\w+)(=)\"?
  beginCaptures:
    '1': {name: entity.other.attribute-name.ansible}
    '2': {name: text}
  end: \"?\s
  patterns:
    - include: $self
    - name: constant.other.ansible
      match: .

- name: string.quoted.double.ansible
  match: ^(\[[0-9a-zA-Z_-]+(((\:)children)*)\])
  captures:
    '2': {name: variable.parameter.ansible}
