Files
zed/crates/languages
Nick Dell'Osa 2c335b81dc Use tree-sitter-go fork (#64562)
# Objective

- Fixes https://github.com/zed-industries/zed/issues/62562
- [tree-sitter-go](https://github.com/tree-sitter/tree-sitter-go) is not
being actively maintained. There have been 2 new versions of Go released
since the most recent commit to main, the most recent (Go 1.27) of which
introduced type parameters for methods, which majorly screws up syntax
highlighting in Zed at the present moment.

## Solution

- **zed-industries** should fork their own version of tree-sitter-go
like they have for
[tree-sitter-go-work](https://github.com/zed-industries/tree-sitter-go-work)
while we all wait for [this
change](https://github.com/tree-sitter/tree-sitter-go/pull/198) to get
merged into the upstream.
- Replace @yodalee's fork with the **zed-industries** fork, I'll update
this PR (or someone else can open one, I just want my syntax
highlighting 😅).

## Testing

- Built and ran this locally and can confirm it fixes the generic method
syntax highlighting issues.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] 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
- [ ] Performance impact has been considered and is acceptable

## Showcase

#### Before
<img width="664" height="428" alt="Screenshot 2026-09-21 at 1 27 59 PM"
src="https://github.com/user-attachments/assets/16e38c94-769b-4991-9b69-87524c8467fb"
/>

#### After
<img width="634" height="440" alt="Screenshot 2026-09-21 at 1 28 59 PM"
src="https://github.com/user-attachments/assets/642a870e-4098-4552-b9d6-1fd3ee97d0e4"
/>

This is a throwaway example so you might think "What's the big deal?"
but I promise you our production code looks way worse without the fix.

---

Release Notes:

- go: add support for syntax highlighting for Go 1.27 generic methods.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2026-10-26 15:39:02 +00:00
..
2026-10-26 15:39:02 +00:00