# languages: Add JS/TS generator functions to outline \(\#34388\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/6f9e052edb347d6af5fc98015657928ba4300790)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 6f9e052edb347d6af5fc98015657928ba4300790

Requested commit: 6f9e052edb347d6af5fc98015657928ba4300790

Commit: 6f9e052edb347d6af5fc98015657928ba4300790

Tree: df300e5360da336c5eb7e157960df96609a97666

Author: Brian Donovan

Committer: GitHub

## Message

```
languages: Add JS/TS generator functions to outline (#34388)

Functions like `function* iterateElements() {}` would not show up in the
editor's navigation outline. With this change, they do.

| **Before** | **After**
|-|-|
|<img width="453" height="280" alt="Screenshot 2025-07-13 at 4 58 22 PM"
src="https://github.com/user-attachments/assets/822f0774-bda2-4855-a6dd-80ba82fffaf3"
/>|<img width="564" height="373" alt="Screenshot 2025-07-13 at 4 58
55 PM"
src="https://github.com/user-attachments/assets/f4f6b84f-cd26-49b7-923b-724860eb18ad"
/>|

Note that I decided to use Zed's agent assistance features to do this PR
as a sort of test run. I don't normally code with an AI assistant, but
figured it might be good in this case since I'm unfamiliar with the
codebase. I must say I was fairly impressed. All the changes in this PR
were done by Claude Sonnet 4, though I have done a manual review to
ensure the changes look sane and tested the changes by running the
re-built `zed` binary with a toy project.

Closes #21631

Release Notes:

- Fixed JS/TS outlines to show generator functions.
```

## Parents

- [2edf85f054480c3773e616779ecab4592391816d](https://git.cafe/gitcafe/zed/commit/2edf85f054480c3773e616779ecab4592391816d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/6f9e052edb347d6af5fc98015657928ba4300790?format=markdown)
