Skip to content

Commit

Permalink
Extract HCL Syntax (#7)
Browse files Browse the repository at this point in the history
- Update Terraform grammar to latest from hashicorp/vscode-terraform@bb95e28
- Move grammar to standard syntaxes directory
- Extract HCL grammar to dedicated file
- Configure Terraform grammar to inherit from HCL grammar
- Add HCL snapshot tests

Co-authored-by: Daniel Banck <dbanck@users.noreply.github.com>
  • Loading branch information
jpogran and dbanck authored Mar 4, 2022
1 parent 539a260 commit d6ee9b7
Show file tree
Hide file tree
Showing 61 changed files with 5,384 additions and 2,913 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Syntax highlighting files for editors (VSCode, SublimeText, TextMate, etc.) for

By product, format:

* HCL - TextMate
* Terraform - TextMate

## What editors this can be used with
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"scripts": {
"check": "prettier --check syntaxes/*.json",
"format": "prettier --write syntaxes/*.json",
"test": "npm run test:grammar && npm run test:snap",
"test:grammar": "npm run test:grammar:terraform",
"test:grammar:terraform": "npx vscode-tmgrammar-test -s source.terraform -g syntaxes/terraform.tmGrammar.json -t tests/unit/**/*.tf",
"test:snap": "npm run test:snap:terraform",
"test:snap:terraform": "npx vscode-tmgrammar-snap -s source.terraform -g syntaxes/terraform.tmGrammar.json -t tests/snapshot/**/*.tf"
"test": "npm run test:snap",
"test:snap": "npm run test:snap:hcl && npm run test:snap:terraform",
"test:snap:update": "npm run test:snap:hcl -- -u && npm run test:snap:terraform -- -u",
"test:snap:hcl": "npx vscode-tmgrammar-snap -s source.hcl -g syntaxes/hcl.tmGrammar.json -t \"tests/snapshot/hcl/*.hcl\"",
"test:snap:terraform": "npx vscode-tmgrammar-snap -s source.hcl.terraform -g syntaxes/terraform.tmGrammar.json -g syntaxes/hcl.tmGrammar.json -t \"tests/snapshot/terraform/*.tf\""
},
"devDependencies": {
"prettier": "^2.5.1",
Expand Down
Loading

0 comments on commit d6ee9b7

Please sign in to comment.