Files
zed/crates/git_ui/Cargo.toml
T
Sudarsh 6990d3f678 git_ui: Fix missing language injections in historical file buffer (#64683)
Buffers built for the commit view (git history -> open excerpts) were
assigned a language without attaching the language registry, so injected
grammars (Markdown-Inline, fenced code block languages) could not be
resolved and their captures went unstyled.

Attach the registry before assigning the language, matching the pattern
in text_diff_view.rs, and add a regression test asserting that a buffer
built via build_buffer parses with Markdown-Inline layers.

Fixes #64577 

# Objective

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, use "Fixes #X" for each issue as
[described in the GitHub
docs](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).

## Solution

- Describe the solution used to achieve the objective above.

## Testing

- Did you test these changes? If so, how?
- Are there any parts that need more testing?
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?

## Self-Review Checklist:

- [x ] I've reviewed my own diff for quality, security, and reliability
- [ x] Unsafe blocks (if any) have justifying comments
- [ x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ x] Tests cover the new/changed behavior
- [x ] Performance impact has been considered and is acceptable

## Showcase

> This section is optional. If this PR does not include a visual change
or does not add a new user-facing feature, you can delete this section.

- Help others understand the result of this PR by showcasing your
awesome work!
- If this PR includes a visual change, consider adding a screenshot,
GIF, or video
- A before/after comparison is very useful for changes to existing
features!

While a showcase should aim to be brief and digestible, you can use a
toggleable section to save space on longer showcases:

<details>
  <summary>Click to view showcase</summary>

<img width="1170" height="831" alt="image"
src="https://github.com/user-attachments/assets/56d948b0-b9da-42ec-abb2-3b19a7b38948"
/>

</details>

---

Release Notes:

- Fixed syntax highlighting for Markdown emphasis, links, and code
blocks when viewing a file at a historical commit
2026-09-24 13:07:25 +00:00

100 lines
2.7 KiB
TOML

[package]
name = "git_ui"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "GPL-3.0-or-later"
[lints]
workspace = true
[lib]
name = "git_ui"
path = "src/git_ui.rs"
doctest = false
[features]
test-support = ["multi_buffer/test-support", "remote_connection/test-support"]
call = ["dep:call"]
[dependencies]
agent_settings.workspace = true
anyhow.workspace = true
askpass.workspace = true
async-channel.workspace = true
buffer_diff.workspace = true
call = { workspace = true, optional = true }
client.workspace = true
collections.workspace = true
component.workspace = true
db.workspace = true
editor.workspace = true
file_icons.workspace = true
futures-lite.workspace = true
futures.workspace = true
fuzzy.workspace = true
fuzzy_nucleo.workspace = true
git.workspace = true
gpui.workspace = true
itertools.workspace = true
language.workspace = true
language_model.workspace = true
log.workspace = true
markdown.workspace = true
menu.workspace = true
multi_buffer.workspace = true
notifications.workspace = true
picker.workspace = true
project.workspace = true
prompt_store.workspace = true
rand.workspace = true
release_channel.workspace = true
remote_connection.workspace = true
schemars.workspace = true
serde.workspace = true
serde_json.workspace = true
settings.workspace = true
smallvec.workspace = true
strum.workspace = true
sysinfo.workspace = true
task.workspace = true
telemetry.workspace = true
terminal.workspace = true
theme.workspace = true
theme_settings.workspace = true
time.workspace = true
time_format.workspace = true
tracing.workspace = true
ui.workspace = true
ui_input.workspace = true
util.workspace = true
watch.workspace = true
workspace.workspace = true
git_ui_core.workspace = true
zed_actions.workspace = true
ztracing.workspace = true
[dev-dependencies]
ctor.workspace = true
db = { workspace = true, features = ["test-support"] }
editor = { workspace = true, features = ["test-support"] }
fs = { workspace = true, features = ["test-support"] }
git = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
indoc.workspace = true
language = { workspace = true, features = ["test-support"] }
pretty_assertions.workspace = true
project = { workspace = true, features = ["test-support"] }
rand.workspace = true
remote_connection = { workspace = true, features = ["test-support"] }
search.workspace = true
settings = { workspace = true, features = ["test-support"] }
task.workspace = true
tree-sitter-md.workspace = true
unindent.workspace = true
workspace = { workspace = true, features = ["test-support"] }
zlog.workspace = true
[package.metadata.cargo-shear]
ignored = ["component", "remote_connection", "tracing"]