on master help sign in
fix(lsp): divide hcl into seperate languages (#2244)
5ca8dfeLukas
book/src/generated/lang-support.md+1
@@ -73,6 +73,7 @@
73| svelte | ✓ | | ✓ | `svelteserver` |
73| svelte | ✓ | | ✓ | `svelteserver` |
74| swift | ✓ | | | `sourcekit-lsp` |
74| swift | ✓ | | | `sourcekit-lsp` |
75| tablegen | ✓ | ✓ | ✓ | |
75| tablegen | ✓ | ✓ | ✓ | |
76+| tfvars | | | | `terraform-ls` |
76| toml | ✓ | | | |
77| toml | ✓ | | | |
77| tsq | ✓ | | | |
78| tsq | ✓ | | | |
78| tsx | ✓ | | | `typescript-language-server` |
79| tsx | ✓ | | | `typescript-language-server` |
languages.toml+13−2
@@ -1039,17 +1039,28 @@ source = { git = "https://github.com/fwcd/tree-sitter-kotlin", rev = "a4f71eb9b8
1039name = "hcl"
1039name = "hcl"
1040scope = "source.hcl"
1040scope = "source.hcl"
1041injection-regex = "(hcl|tf|nomad)"
1041injection-regex = "(hcl|tf|nomad)"
1042−file-types = ["hcl", "tf", "tfvars", "nomad"]
1042+file-types = ["hcl", "tf", "nomad"]
1043roots = []
1043roots = []
1044comment-token = "#"
1044comment-token = "#"
1045indent = { tab-width = 2, unit = " " }
1045indent = { tab-width = 2, unit = " " }
1046−language-server = { command = "terraform-ls", args = ["serve"] }
1046+language-server = { command = "terraform-ls", args = ["serve"], language-id = "terraform" }
1047auto-format = true
1047auto-format = true
1048
1048
1049[[grammar]]
1049[[grammar]]
1050name = "hcl"
1050name = "hcl"
1051source = { git = "https://github.com/MichaHoffmann/tree-sitter-hcl", rev = "3cb7fc28247efbcb2973b97e71c78838ad98a583" }
1051source = { git = "https://github.com/MichaHoffmann/tree-sitter-hcl", rev = "3cb7fc28247efbcb2973b97e71c78838ad98a583" }
1052
1052
1053+[[language]]
1054+name = "tfvars"
1055+scope = "source.tfvars"
1056+file-types = ["tfvars"]
1057+roots = []
1058+comment-token = "#"
1059+indent = { tab-width = 2, unit = " " }
1060+language-server = { command = "terraform-ls", args = ["serve"], language-id = "terraform-vars" }
1061+auto-format = true
1062+grammar = "hcl"
1063+
1053[[language]]
1064[[language]]
1054name = "org"
1065name = "org"
1055scope = "source.org"
1066scope = "source.org"