{ "name": "hcl", "scopeName": "source.hcl", "comment": "HashiCorp Configuration Language", "fileTypes": ["tf", "tfvars", "nomad", "hcl", "appfile"], "patterns": [ { "include": "#comments" }, { "include": "#constructs" }, { "include": "#variable" } ], "repository": { "comments": { "patterns": [ { "comment": "Single line comments with number-sign", "match": "(#)+(.*)", "captures": { "0": { "name": "comment.line.number-sign.hcl" } } }, { "comment": "Single line comments with double-slash", "match": "(//)+(.*)", "captures": { "0": { "name": "comment.line.double-slash.hcl" } } }, { "comment": "Multiple line comment block", "begin": "/\\*", "beginCaptures": { "0": { "name": "comment.block.documentation.hcl" } }, "end": "\\*/", "endCaptures": { "0": { "name": "comment.block.documentation.hcl" } }, "contentName": "comment.block.documentation.hcl" } ] }, "constructs": { "patterns": [ { "begin": "([\\w-]+)\\s*\\{", "beginCaptures": { "0": { "name": "meta.function.hcl" }, "1": { "name": "storage.type.hcl" } }, "end": "\\}", "patterns": [ { "include": "$self" }, { "include": "#comments" }, { "include": "#variable" } ] }, { "begin": "([\\w-]+)((?:\\s*\"[^\"]*\")*)\\s*\\{", "beginCaptures": { "0": { "name": "meta.function.hcl" }, "1": { "name": "storage.type.hcl" }, "2": { "name": "string.quoted.double.hcl" } }, "end": "\\}", "patterns": [ { "include": "$self" }, { "include": "#comments" }, { "include": "#variable" } ] } ] }, "variable": { "patterns": [ { "begin": "([\\w\\.-]+)\\s*(=)\\s*", "beginCaptures": { "1": { "name": "variable.parameter.hcl" }, "2": { "name": "keyword.operator.hcl" } }, "end": "(?