ZIm/crates
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
..
activity_indicator Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
ai Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
assets Fix some formatting issues in Cargo.toml files (#7127) 2024-01-30 22:01:35 -05:00
assistant assistant: render api key editor if no credentials are set (#7197) 2024-02-01 11:16:03 +01:00
audio Restrict access to global Audio (#7122) 2024-01-30 20:49:58 -05:00
auto_update Dismiss update notification when viewing releases notes (#7297) 2024-02-02 22:52:28 +02:00
breadcrumbs Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
call Do more on channel join (#7268) 2024-02-02 09:52:30 -07:00
channel Links to channel notes (#7262) 2024-02-01 22:22:02 -07:00
cli Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
client Don't log errors on main (#7289) 2024-02-02 19:24:49 -07:00
clock Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
collab Fix cmd+k in terminal and fix sporadic keybind misses (#7388) 2024-02-05 10:55:27 -07:00
collab_ui Fix main (#7293) 2024-02-02 12:21:45 -05:00
collections gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
color Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
command_palette Fix some typos in comments (#7169) 2024-01-31 16:21:33 -05:00
copilot Send lsp_types::InitializeParams with Zed version (#7216) 2024-02-01 18:39:28 +02:00
copilot_ui WIP: Add a setting to visually redact enviroment variables (#7124) 2024-01-31 11:42:09 -08:00
db Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
diagnostics Fix some formatting issues in Cargo.toml files (#7127) 2024-01-30 22:01:35 -05:00
editor Make inlay hints test less flacky (#7396) 2024-02-05 20:19:50 +02:00
feature_flags Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
feedback app version to server (#7130) 2024-01-31 15:46:24 -07:00
file_finder file_finder: Simplify removal of file name from file path (#7398) 2024-02-05 13:26:42 -05:00
fs Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
fsevent fix: isolate macos-specific dependencies (#6854) 2024-01-27 13:38:55 +01:00
fuzzy Fix panic in fuzzy-finder for unicode characters (#7080) 2024-01-30 16:10:35 +01:00
git Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
go_to_line Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
gpui Fix cmd+k in terminal and fix sporadic keybind misses (#7388) 2024-02-05 10:55:27 -07:00
gpui_macros Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
install_cli Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
journal Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
language Show diagnostics in scrollbar (#7175) 2024-02-02 12:10:42 +02:00
language_selector Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
language_tools Send lsp_types::InitializeParams with Zed version (#7216) 2024-02-01 18:39:28 +02:00
live_kit_client Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
live_kit_server Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
lsp Support documentation as a resolvable property (#7306) 2024-02-03 22:35:57 +02:00
markdown_preview Fix scrolling and wrapping in the markdown preview renderer (#7234) 2024-02-01 09:07:01 -08:00
media Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
menu Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
multi_buffer Show diagnostics in scrollbar (#7175) 2024-02-02 12:10:42 +02:00
node_runtime Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
notifications Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
outline Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
picker picker: Outline Editor::new 2024-02-05 14:01:06 +01:00
plugin Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
plugin_macros Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
plugin_runtime Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
prettier Send lsp_types::InitializeParams with Zed version (#7216) 2024-02-01 18:39:28 +02:00
project project: Do not inline LSP related methods 2024-02-02 11:38:09 +01:00
project_panel Fix project panel selection related issues (#7245) 2024-02-02 11:17:46 +02:00
project_symbols Send lsp_types::InitializeParams with Zed version (#7216) 2024-02-01 18:39:28 +02:00
quick_action_bar Editor toolbar configuration (#7338) 2024-02-03 22:40:54 +02:00
recent_projects Fix some formatting issues in Cargo.toml files (#7127) 2024-01-30 22:01:35 -05:00
refineable Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
release_channel app version to server (#7130) 2024-01-31 15:46:24 -07:00
rich_text Add inline code blocks in markdown preview (#7277) 2024-02-02 16:51:05 +02:00
rope Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
rpc disallow opening private files (#7165) 2024-01-31 12:05:51 -08:00
search Fix some formatting issues in Cargo.toml files (#7127) 2024-01-30 22:01:35 -05:00
semantic_index Fix some formatting issues in Cargo.toml files (#7127) 2024-01-30 22:01:35 -05:00
settings app version to server (#7130) 2024-01-31 15:46:24 -07:00
snippet Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
sqlez Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
sqlez_macros Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
story Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
storybook Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
sum_tree Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
terminal Add support for relative terminal links (#7303) 2024-02-03 17:04:27 +02:00
terminal_view Fix cmd+k in terminal and fix sporadic keybind misses (#7388) 2024-02-05 10:55:27 -07:00
text Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
theme Improve the contrast of the default search_match_background colors (#7382) 2024-02-05 10:45:41 -05:00
theme_importer theme_importer: Make VS Code theme parsing more lenient (#7292) 2024-02-02 12:09:05 -05:00
theme_selector Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
ui Correctly use the base element in HighlightedLabel (#7397) 2024-02-05 13:21:07 -05:00
util Add support for relative terminal links (#7303) 2024-02-03 17:04:27 +02:00
vcs_menu Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
vim vim hml (#7298) 2024-02-02 19:24:36 -07:00
welcome Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
workspace Editor toolbar configuration (#7338) 2024-02-03 22:40:54 +02:00
zed Add Terraform & HCL syntax highlighting (#6882) 2024-02-05 11:38:30 -08:00
zed_actions Fix casing of OpenZedUrl action (#7045) 2024-01-29 23:50:31 -05:00