feat(hcl,terraform): split terraform from hcl, add specialized queries for tf

This enables us to have different queries for
terraform and general hcl. It solve the situation
where other dialects of hcl (nomad, packer, etc)
might use a terraform keyword and get highlighted
out of place.
This commit is contained in:
Michael Hoffmann 2022-12-02 23:47:19 +01:00 committed by Stephan Seitz
parent c06baac6a1
commit ee3e9f4dc0
17 changed files with 47 additions and 12 deletions

View file

@ -8,7 +8,6 @@ local filetype_to_parsername = {
PKGBUILD = "bash",
html_tags = "html",
["typescript.tsx"] = "tsx",
terraform = "hcl",
["html.handlebars"] = "glimmer",
systemverilog = "verilog",
cls = "latex",
@ -618,6 +617,17 @@ list.hcl = {
filetype = "hcl",
}
list.terraform = {
install_info = {
url = "https://github.com/MichaHoffmann/tree-sitter-hcl",
files = { "src/parser.c", "src/scanner.cc" },
branch = "main",
location = "dialects/terraform",
},
maintainers = { "@MichaHoffmann" },
filetype = "terraform",
}
list.markdown = {
install_info = {
url = "https://github.com/MDeiml/tree-sitter-markdown",