From e413b7e35165509fa8e5526fad2c391975e9931b Mon Sep 17 00:00:00 2001 From: Hugo Barrera Date: Wed, 24 Feb 2021 09:23:44 +0000 Subject: Set terraformls to also operate on `hcl` files The file format that terraformls checks is HCL (Hashicorp Configuration Language). Tools like `vim-hcl` actually set this `filetype` correctly. Make the LSP pick up these files correctly too. --- lua/lspconfig/terraformls.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/lspconfig/terraformls.lua b/lua/lspconfig/terraformls.lua index 90c973dd..d26b37c0 100644 --- a/lua/lspconfig/terraformls.lua +++ b/lua/lspconfig/terraformls.lua @@ -4,7 +4,7 @@ local util = require 'lspconfig/util' configs.terraformls = { default_config = { cmd = {"terraform-ls", "serve"}; - filetypes = {"terraform"}; + filetypes = {"terraform", "hcl"}; root_dir = util.root_pattern(".terraform", ".git"); }; docs = { -- cgit v1.2.3-70-g09d2