From ee3e9f4dc0e5ee9e2bfb1ee47638375840b8fe0f Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Fri, 2 Dec 2022 23:47:19 +0100 Subject: 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. --- lua/nvim-treesitter/parsers.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index f4e13974b..6bd94f93b 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -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", -- cgit v1.2.3-70-g09d2