aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas2022-04-23 21:08:12 +0000
committerGitHub2022-04-23 21:08:12 +0000
commit5ca8dfe57c044227274b73f9169ae68cebf1d074 (patch)
tree8e337243c688080b633dd6f96d22a3b4f01227d4
parent6047506ec56787e5a87d0dfe9cb90646004becf5 (diff)
fix(lsp): divide hcl into seperate languages (#2244)
-rw-r--r--book/src/generated/lang-support.md1
-rw-r--r--languages.toml15
2 files changed, 14 insertions, 2 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index 259ffe00..1f0ae241 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -73,6 +73,7 @@
| svelte | ✓ | | ✓ | `svelteserver` |
| swift | ✓ | | | `sourcekit-lsp` |
| tablegen | ✓ | ✓ | ✓ | |
+| tfvars | | | | `terraform-ls` |
| toml | ✓ | | | |
| tsq | ✓ | | | |
| tsx | ✓ | | | `typescript-language-server` |
diff --git a/languages.toml b/languages.toml
index 19d42e96..d5a93f11 100644
--- a/languages.toml
+++ b/languages.toml
@@ -1039,11 +1039,11 @@ source = { git = "https://github.com/fwcd/tree-sitter-kotlin", rev = "a4f71eb9b8
name = "hcl"
scope = "source.hcl"
injection-regex = "(hcl|tf|nomad)"
-file-types = ["hcl", "tf", "tfvars", "nomad"]
+file-types = ["hcl", "tf", "nomad"]
roots = []
comment-token = "#"
indent = { tab-width = 2, unit = " " }
-language-server = { command = "terraform-ls", args = ["serve"] }
+language-server = { command = "terraform-ls", args = ["serve"], language-id = "terraform" }
auto-format = true
[[grammar]]
@@ -1051,6 +1051,17 @@ name = "hcl"
source = { git = "https://github.com/MichaHoffmann/tree-sitter-hcl", rev = "3cb7fc28247efbcb2973b97e71c78838ad98a583" }
[[language]]
+name = "tfvars"
+scope = "source.tfvars"
+file-types = ["tfvars"]
+roots = []
+comment-token = "#"
+indent = { tab-width = 2, unit = " " }
+language-server = { command = "terraform-ls", args = ["serve"], language-id = "terraform-vars" }
+auto-format = true
+grammar = "hcl"
+
+[[language]]
name = "org"
scope = "source.org"
injection-regex = "org"