ZIm/crates/zed/Cargo.toml
Caius Durling 6863b9263e
Add Terraform & HCL syntax highlighting (#6882)
Terraform and HCL are almost the same language, but not quite so
proposing them as separate languages within Zed. (Terraform is an
extension of HCL, with a different formatter.)

This is just adding the language definition, parsing and highlighting
functionality, not any LSP or formatting beyond that for either
language.

I've taken a bunch of inspiration from Neovim for having the separate
languages, and also lifted some of their `scm` files (with attribution
comments in this codebase) as the tree-sitter repo doesn't contain them.
(Neovim's code is Apache-2.0 licensed, so should be fine here with
attribution from reading Zed's licenses files.) I've then amended to
make sure the capture groups are named for things Zed understands. I'd
love someone from Zed to confirm that's okay, or if I should clean-room
implement the `scm` files.

Highlighting in Terraform & HCL with a moderate amount of syntax in a
file (Terraform on left, HCL on right.)

<img width="1392" alt="Screenshot 2024-01-31 at 18 07 45"
src="https://github.com/zed-industries/zed/assets/696/1d3c9a08-588e-4b8f-ad92-98ce1e419659">

Release Notes:

- (|Improved) ...
([#5098](https://github.com/zed-industries/zed/issues/5098)).
2024-02-05 11:38:30 -08:00

201 lines
6.3 KiB
TOML

[package]
description = "The fast, collaborative code editor."
edition = "2021"
name = "zed"
version = "0.122.0"
publish = false
license = "GPL-3.0-or-later"
[lib]
name = "zed"
path = "src/zed.rs"
doctest = false
[[bin]]
name = "Zed"
path = "src/main.rs"
[dependencies]
activity_indicator = { path = "../activity_indicator" }
ai = { path = "../ai" }
anyhow.workspace = true
assets = { path = "../assets" }
assistant = { path = "../assistant" }
async-compression.workspace = true
async-recursion = "0.3"
async-tar = "0.4.2"
async-trait.workspace = true
audio = { path = "../audio" }
auto_update = { path = "../auto_update" }
backtrace = "0.3"
breadcrumbs = { path = "../breadcrumbs" }
call = { path = "../call" }
channel = { path = "../channel" }
chrono = "0.4"
cli = { path = "../cli" }
client = { path = "../client" }
collab_ui = { path = "../collab_ui" }
collections = { path = "../collections" }
command_palette = { path = "../command_palette" }
copilot = { path = "../copilot" }
copilot_ui = { path = "../copilot_ui" }
ctor.workspace = true
db = { path = "../db" }
diagnostics = { path = "../diagnostics" }
editor = { path = "../editor" }
env_logger.workspace = true
feature_flags = { path = "../feature_flags" }
feedback = { path = "../feedback" }
file_finder = { path = "../file_finder" }
fs = { path = "../fs" }
fsevent = { path = "../fsevent" }
futures.workspace = true
go_to_line = { path = "../go_to_line" }
gpui = { path = "../gpui" }
ignore = "0.4"
image = "0.23"
indexmap = "1.6.2"
install_cli = { path = "../install_cli" }
isahc.workspace = true
itertools = "0.11"
journal = { path = "../journal" }
language = { path = "../language" }
language_selector = { path = "../language_selector" }
language_tools = { path = "../language_tools" }
lazy_static.workspace = true
libc = "0.2"
log.workspace = true
lsp = { path = "../lsp" }
markdown_preview = { path = "../markdown_preview" }
menu = { path = "../menu" }
mimalloc = "0.1"
node_runtime = { path = "../node_runtime" }
notifications = { path = "../notifications" }
num_cpus = "1.13.0"
outline = { path = "../outline" }
parking_lot.workspace = true
postage.workspace = true
project = { path = "../project" }
project_panel = { path = "../project_panel" }
project_symbols = { path = "../project_symbols" }
quick_action_bar = { path = "../quick_action_bar" }
rand.workspace = true
recent_projects = { path = "../recent_projects" }
regex.workspace = true
release_channel = { path = "../release_channel" }
rope = { path = "../rope" }
rpc = { path = "../rpc" }
rsa = "0.4"
rust-embed.workspace = true
schemars.workspace = true
search = { path = "../search" }
semantic_index = { path = "../semantic_index" }
serde.workspace = true
serde_derive.workspace = true
serde_json.workspace = true
settings = { path = "../settings" }
shellexpand = "2.1.0"
simplelog = "0.9"
smallvec.workspace = true
smol.workspace = true
sum_tree = { path = "../sum_tree" }
tempfile.workspace = true
terminal_view = { path = "../terminal_view" }
text = { path = "../text" }
theme = { path = "../theme" }
theme_selector = { path = "../theme_selector" }
thiserror.workspace = true
tiny_http = "0.8"
toml.workspace = true
tree-sitter-bash.workspace = true
tree-sitter-beancount.workspace = true
tree-sitter-c-sharp.workspace = true
tree-sitter-c.workspace = true
tree-sitter-cpp.workspace = true
tree-sitter-css.workspace = true
tree-sitter-elixir.workspace = true
tree-sitter-elm.workspace = true
tree-sitter-embedded-template.workspace = true
tree-sitter-erlang.workspace = true
tree-sitter-gitcommit.workspace = true
tree-sitter-gleam.workspace = true
tree-sitter-glsl.workspace = true
tree-sitter-go.workspace = true
tree-sitter-gomod.workspace = true
tree-sitter-gowork.workspace = true
tree-sitter-haskell.workspace = true
tree-sitter-hcl.workspace = true
tree-sitter-heex.workspace = true
tree-sitter-html.workspace = true
tree-sitter-json.workspace = true
tree-sitter-lua.workspace = true
tree-sitter-markdown.workspace = true
tree-sitter-nix.workspace = true
tree-sitter-nu.workspace = true
tree-sitter-ocaml.workspace = true
tree-sitter-php.workspace = true
tree-sitter-proto.workspace = true
tree-sitter-purescript.workspace = true
tree-sitter-python.workspace = true
tree-sitter-racket.workspace = true
tree-sitter-ruby.workspace = true
tree-sitter-rust.workspace = true
tree-sitter-scheme.workspace = true
tree-sitter-svelte.workspace = true
tree-sitter-toml.workspace = true
tree-sitter-typescript.workspace = true
tree-sitter-uiua.workspace = true
tree-sitter-vue.workspace = true
tree-sitter-yaml.workspace = true
tree-sitter-zig.workspace = true
tree-sitter.workspace = true
url.workspace = true
urlencoding = "2.1.2"
util = { path = "../util" }
uuid.workspace = true
vim = { path = "../vim" }
welcome = { path = "../welcome" }
workspace = { path = "../workspace" }
zed_actions = { path = "../zed_actions" }
[dev-dependencies]
call = { path = "../call", features = ["test-support"] }
editor = { path = "../editor", features = ["test-support"] }
gpui = { path = "../gpui", features = ["test-support"] }
language = { path = "../language", features = ["test-support"] }
project = { path = "../project", features = ["test-support"] }
text = { path = "../text", features = ["test-support"] }
unindent.workspace = true
workspace = { path = "../workspace", features = ["test-support"] }
[package.metadata.bundle-dev]
icon = ["resources/app-icon-preview@2x.png", "resources/app-icon-preview.png"]
identifier = "dev.zed.Zed-Dev"
name = "Zed Dev"
osx_minimum_system_version = "10.15.7"
osx_info_plist_exts = ["resources/info/*"]
osx_url_schemes = ["zed-dev"]
[package.metadata.bundle-nightly]
icon = ["resources/app-icon-nightly@2x.png", "resources/app-icon-nightly.png"]
identifier = "dev.zed.Zed-Nightly"
name = "Zed Nightly"
osx_minimum_system_version = "10.15.7"
osx_info_plist_exts = ["resources/info/*"]
osx_url_schemes = ["zed-nightly"]
[package.metadata.bundle-preview]
icon = ["resources/app-icon-preview@2x.png", "resources/app-icon-preview.png"]
identifier = "dev.zed.Zed-Preview"
name = "Zed Preview"
osx_minimum_system_version = "10.15.7"
osx_info_plist_exts = ["resources/info/*"]
osx_url_schemes = ["zed-preview"]
[package.metadata.bundle-stable]
icon = ["resources/app-icon@2x.png", "resources/app-icon.png"]
identifier = "dev.zed.Zed"
name = "Zed"
osx_minimum_system_version = "10.15.7"
osx_info_plist_exts = ["resources/info/*"]
osx_url_schemes = ["zed"]