on master help sign in
Add terraform lsp support (#1726)

Using terraform-ls and enables auto-formate support. Also adds tfvars as an extra filetype.

commita76e94848a69e24a94501b47efac2ca94aaf1257 authorMichael Daffin <michael@daffin.io> dateTue 1 Mar 2022, 11:59 (5 years ago) parent49c5bc5
2 files changed+4−2
book/src/generated/lang-support.md+1−1 languages.toml+3−1
book/src/generated/lang-support.md+1−1
@@ -21,7 +21,7 @@
2121| go | ✓ | ✓ | ✓ | `gopls` |
2222| graphql | ✓ | | | |
2323| haskell | ✓ | | | `haskell-language-server-wrapper` |
24−| hcl | ✓ | | ✓ | |
24+| hcl | ✓ | | ✓ | `terraform-ls` |
2525| html | ✓ | | | |
2626| iex | ✓ | | | |
2727| java | ✓ | | | |
languages.toml+3−1
@@ -762,7 +762,9 @@ language-server = { command = "kotlin-language-server" }
762762name = "hcl"
763763scope = "source.hcl"
764764injection-regex = "(hcl|tf)"
765−file-types = ["hcl", "tf"]
765+file-types = ["hcl", "tf", "tfvars"]
766766roots = []
767767comment-token = "#"
768768indent = { tab-width = 2, unit = " " }
769+language-server = { command = "terraform-ls", args = ["serve"] }
770+auto-format = true