# languages: Separate control flow keywords for JS/TS/TSX \(\#39801\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 96415e2d19df23f9efe293f6ced57a667a6c003b

Requested commit: 96415e2d19df23f9efe293f6ced57a667a6c003b

Commit: 96415e2d19df23f9efe293f6ced57a667a6c003b

Tree: 628050ba544a2bcc85dcec533373abbaf3423087

Author: Alex Zeier

Committer: GitHub

## Message

```
languages: Separate control flow keywords for JS/TS/TSX (#39801)

Related to #9461, inspired by #39683

`await` and `yield` both seem somewhat debatable on whether they should
be considered the be control flow keywords.

For now I went with:
- `await`: no – The control flow effect of `await` is at a level does
not seem relevant for syntax highlighting.
- `yield`: yes – `yield` directly affects the output of a generator, and
is also included for consistency with Rust (#39683).
 
 Happy to change these either direction.

<img width="1151" height="730" alt="SCR-20251008-izus"
src="https://github.com/user-attachments/assets/533ea670-863a-4c5c-aaa5-4a9bfa0bf0dd"
/>

--- 

Release Notes:

- Improved granularity of keyword highlighting for JS/TS/TSX: Themes can
now specify `keyword.control` for control flow keywords like `if`,
`else`, `return`, etc.
```

## Parents

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

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