zed/crates/languages
Daniel Banck bbc4ed9cab
Add language server for Terraform (#7657)
* Depends on: https://github.com/zed-industries/zed/pull/7449
* Closes: https://github.com/zed-industries/zed/issues/5098

---

This PR adds support for downloading and running the Terraform language
server for `*.tf` and `*.tfvars` files. I've verified that the code
works for `aarch64` and `x86_64` macOS. Downloading new language server
versions on release also works as expected.

Furthermore this PR adds:
- A short docs page for Terraform
- An icon for `*.tf` and `*.tfvars` files

## UX

### File Icons

![CleanShot 2024-02-10 at 23 10
13@2x](https://github.com/zed-industries/zed/assets/45985/6f7cd4f0-e94c-4cfb-b3e9-64b0e33c8a43)

### Completion

![CleanShot 2024-02-13 at 20 54
15@2x](https://github.com/zed-industries/zed/assets/45985/18fafa3b-cb50-4f51-b071-ca9eee3521a6)

### Hover

![CleanShot 2024-02-13 at 20 53
40@2x](https://github.com/zed-industries/zed/assets/45985/4d215315-e019-4d3d-b23c-2691db1803e3)

### Go to definition

![2024-02-13 20 56
28](https://github.com/zed-industries/zed/assets/45985/c21d562f-eb0b-4df9-9175-c53b9923344e)

### Formatting

![2024-02-13 20 59
06](https://github.com/zed-industries/zed/assets/45985/0cdf4ec5-e231-4c8a-a257-cae30a8edc8b)

and more!

## Known issue(s)

@fdionisi discovered that sometimes completion results are inserted with
the wrong indentation. Or rather, if you look closely, they are inserted
with the correct indentation and then something shifts the closing `}`.
I don't think this is related to LSP support and can be addressed in a
separate PR.

![2024-02-13 20 58
16](https://github.com/zed-industries/zed/assets/45985/94a118dd-95f5-4e38-8f83-75fec7a0dddf)

Release Notes:

- Add language server support for Terraform
([#5098](https://github.com/zed-industries/zed/issues/5098)).

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2024-02-26 17:08:49 -08:00
..
src Add language server for Terraform (#7657) 2024-02-26 17:08:49 -08:00
Cargo.toml Hoist languages crate's dependencies to the workspace level (#8394) 2024-02-25 12:02:59 -05:00
LICENSE-GPL chore: Extract languages from zed crate (#8270) 2024-02-23 15:56:08 +01:00