From 9ed84c416efe3ede4c228d0a0fde67ed75ecc481 Mon Sep 17 00:00:00 2001 From: Michael Daffin Date: Tue, 1 Mar 2022 11:08:52 +0000 Subject: [PATCH] Add terraform lsp support Using terraform-ls and enables auto-formate support. Also adds tfvars as an extra filetype. --- book/src/generated/lang-support.md | 2 +- languages.toml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 40ca50f6859c..62a2734b84a0 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -21,7 +21,7 @@ | go | ✓ | ✓ | ✓ | `gopls` | | graphql | ✓ | | | | | haskell | ✓ | | | `haskell-language-server-wrapper` | -| hcl | ✓ | | ✓ | | +| hcl | ✓ | | ✓ | `terraform-ls` | | html | ✓ | | | | | iex | ✓ | | | | | java | ✓ | | | | diff --git a/languages.toml b/languages.toml index 2ce4cf1296db..8d210b63cce3 100644 --- a/languages.toml +++ b/languages.toml @@ -762,7 +762,9 @@ language-server = { command = "kotlin-language-server" } name = "hcl" scope = "source.hcl" injection-regex = "(hcl|tf)" -file-types = ["hcl", "tf"] +file-types = ["hcl", "tf", "tfvars"] roots = [] comment-token = "#" indent = { tab-width = 2, unit = " " } +language-server = { command = "terraform-ls", args = ["serve"] } +auto-format = true