Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lsp): divide hcl into seperate languages #2244

Merged
merged 3 commits into from
Apr 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
| svelte | ✓ | | ✓ | `svelteserver` |
| swift | ✓ | | | `sourcekit-lsp` |
| tablegen | ✓ | ✓ | ✓ | |
| tfvars | | | | `terraform-ls` |
| toml | ✓ | | | |
| tsq | ✓ | | | |
| tsx | ✓ | | | `typescript-language-server` |
Expand Down
15 changes: 13 additions & 2 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1038,17 +1038,28 @@ 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]]
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"
Expand Down