From 660cad50ddfc54de7a165aae69fd7d4b5bb066ae Mon Sep 17 00:00:00 2001 From: Konstantin Kushnir Date: Sun, 17 Nov 2024 03:37:23 +0000 Subject: [PATCH] Add HashiCorp HCL / HashiCorp Terraform schemes --- CHANGELOG.md | 2 + hrc/hrc/proto.hrc | 10 + hrc/hrc/scripts/hcl/hcl.hrc | 414 ++++++++++++++++++++++++++++++ hrc/hrc/scripts/hcl/terraform.hrc | 246 ++++++++++++++++++ 4 files changed, 672 insertions(+) create mode 100644 hrc/hrc/scripts/hcl/hcl.hrc create mode 100644 hrc/hrc/scripts/hcl/terraform.hrc diff --git a/CHANGELOG.md b/CHANGELOG.md index ac5dea0..171238c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,8 @@ - [shell-bash] add functions to outlined list - [markdown] added the ability to connect the backlight in 'code' by creating your own scheme 'markdown2:markdown2' - [markdown] highlight special all caps HTML tags +- [hcl] add a new schema for HashiCorp HCL +- [terraform] add a new schema for HashiCorp Terraform ## [1.2.0] - 2021-09-12 diff --git a/hrc/hrc/proto.hrc b/hrc/hrc/proto.hrc index b105883..a014d58 100644 --- a/hrc/hrc/proto.hrc +++ b/hrc/hrc/proto.hrc @@ -733,6 +733,16 @@ /\.y$/i + + + + /\.hcl$/i + + + + /\.tf$/i + /\.tfvars$/i + diff --git a/hrc/hrc/scripts/hcl/hcl.hrc b/hrc/hrc/scripts/hcl/hcl.hrc new file mode 100644 index 0000000..cd99b20 --- /dev/null +++ b/hrc/hrc/scripts/hcl/hcl.hrc @@ -0,0 +1,414 @@ + + + + + + + HashiCorp HCL + + Based on: + https://github.com/hashicorp/hcl/blob/main/hclsyntax/spec.md + https://github.com/hashicorp/syntax/blob/main/syntaxes/hcl.tmGrammar.json + + Notes: + This schema can be simplified by reducing the number of schemas. + However, now its structure is similar to the official reference at + https://github.com/hashicorp/syntax/blob/main/src/_main.yml to make + it easier to add new features and enhancements. + + Home: https://github.com/chpock/ck.colorer-schemes + Send requests there for bug fixes and features. + + + ]]> + + + + + /\.hcl$/i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hrc/hrc/scripts/hcl/terraform.hrc b/hrc/hrc/scripts/hcl/terraform.hrc new file mode 100644 index 0000000..4e8d300 --- /dev/null +++ b/hrc/hrc/scripts/hcl/terraform.hrc @@ -0,0 +1,246 @@ + + + + + + + HashiCorp Terraform + + Based on: + https://github.com/hashicorp/syntax/blob/main/src/terraform.yml + + Notes: + This schema can be simplified by reducing the number of schemas. + However, now its structure is similar to the official reference at + https://github.com/hashicorp/syntax/blob/main/src/terraform.yml to make + it easier to add new features and enhancements. + + Home: https://github.com/chpock/ck.colorer-schemes + Send requests there for bug fixes and features. + + + ]]> + + + + + /\.tf$/i + /\.tfvars$/i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +