mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
%YAML 1.2
|
|
---
|
|
name: HCL
|
|
file_extensions:
|
|
- hcl
|
|
- tf
|
|
- tfvars
|
|
scope: source.hcl
|
|
contexts:
|
|
main:
|
|
- include: comments
|
|
- include: strings
|
|
- include: numbers
|
|
- match: '\b(true|false|null)\b'
|
|
scope: constant.language.hcl
|
|
- match: '\b(resource|variable|output|provider|module|locals|data)\b'
|
|
scope: keyword.declaration.hcl
|
|
- match: '[A-Za-z_][A-Za-z0-9_]*\s*(?=\{)'
|
|
scope: entity.name.section.hcl
|
|
- match: '[A-Za-z_][A-Za-z0-9_]*\s*=\s*'
|
|
scope: support.type.property-name.hcl
|
|
|
|
comments:
|
|
- match: '#.*$'
|
|
scope: comment.line.number-sign.hcl
|
|
- match: '//.*$'
|
|
scope: comment.line.double-slash.hcl
|
|
- match: '/\*'
|
|
scope: comment.block.hcl
|
|
push:
|
|
- match: '\*/'
|
|
pop: true
|
|
|
|
strings:
|
|
- match: '"'
|
|
scope: punctuation.definition.string.begin.hcl
|
|
push:
|
|
- meta_scope: string.quoted.double.hcl
|
|
- match: '"'
|
|
scope: punctuation.definition.string.end.hcl
|
|
pop: true
|
|
- match: '\\.'
|
|
scope: constant.character.escape.hcl
|
|
|
|
numbers:
|
|
- match: '\b-?\d+(?:\.\d+)?\b'
|
|
scope: constant.numeric.hcl
|