# languages: Fix semantic tokens for Go \(\#51621\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5b6201d2b2ecada020314ce8bc1f72607ac03e58

Requested commit: 5b6201d2b2ecada020314ce8bc1f72607ac03e58

Commit: 5b6201d2b2ecada020314ce8bc1f72607ac03e58

Tree: 9f9ec5575b30a29c3c4b22449cabe4c6c379f343

Author: Finn Eitreim

Committer: GitHub

## Message

```
languages: Fix semantic tokens for Go (#51621)

Closes #51620

gopls requires more specific initialization for semantic tokens that
other language-servers for reasons that aren't entirely clear to me, it
is however a small fix to make it work. still trying to track down other
malfunctioning language servers in the semantic token realm, so if you
have suggestions let me know.

original behavior (on nightly v0.229):
<img width="1784" height="1123" alt="nightly_behavior"
src="https://github.com/user-attachments/assets/5d976b34-2720-425c-8617-800291862909"
/>

updated behavior:
<img width="1784" height="1124" alt="fix_applied"
src="https://github.com/user-attachments/assets/17c528b9-fea8-4309-9306-44673afc9fc3"
/>

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- gopls: fixed semantic token support with gopls.
```

## Parents

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

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