# go: Add semantic token rule for format string interpolations \(\#52394\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 90fa50a617eb545a91da853b8724ffaefaaeff93

Requested commit: 90fa50a617eb545a91da853b8724ffaefaaeff93

Commit: 90fa50a617eb545a91da853b8724ffaefaaeff93

Tree: 1b758bfd2c4626348545d959babbb8497e1a0008

Author: Marat Fattakhov

Committer: GitHub

## Message

```
go: Add semantic token rule for format string interpolations (#52394)

## Context

Closes #52391

gopls sends semantic tokens for format args with [format] modifier.
Without a simple support for there is no special highlighting for format
args like `%s`. Its a simple change inside
`go/semantic_token_rules.json` that makes this a default behavior.

Currently (on 0.229 preview):
<img width="1136" height="675" alt="Screenshot 2026-03-25 at 11 34 57"
src="https://github.com/user-attachments/assets/cd3d9a52-6740-47b5-8f05-02514cb4f9df"
/>

After fix:

<img width="1136" height="675" alt="Screenshot 2026-03-25 at 11 58 37"
src="https://github.com/user-attachments/assets/5ec4277b-39c1-4fe1-bed5-8a6fa63c18c9"
/>


## Self-Review Checklist

<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- gopls: Add semantic token rule for format string interpolations
```

## Parents

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

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