markdown: Add LaTeX syntax highlighting injection (#41110)

Closes [#30264](https://github.com/zed-industries/zed/issues/30264)

Small addition based on
[nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter/blob/main/runtime/queries/markdown_inline/injections.scm)

<img width="1122" height="356" alt="Screenshot From 2025-10-24 15-47-58"
src="https://github.com/user-attachments/assets/33e7387d-a299-4921-9db8-622d2657bec1"
/>

This does require the LaTeX extension to be installed.

Release Notes:

- Added LaTeX highlighting for inline and display equations in Markdown when the LaTeX extension is installed

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
This commit is contained in:
Luke Naylor
2025-11-21 16:57:56 +00:00
committed by GitHub
co-authored by Ben Kunkle
parent 4fb671f4eb
commit 5a9b810aef
@@ -0,0 +1,2 @@
((latex_block) @injection.content
(#set! injection.language "latex"))