Skip to content

Semantic token highlighting breaks after restarting LSPs #51450

@feitreim

Description

@feitreim

Reproduction steps

  1. Start zed
  2. enable semantic_tokens = "full"
  3. include ty as a lsp for python
  4. create dummy python file
  5. once the highlighting appears, restart the lsp
  6. highlighting is gone and wont come back, even if you switch it on and off.

Current vs. Expected behavior

video of it misbehaving:

Screen.Recording.2026-03-12.at.11.34.44.PM.mov

current:
semantic token highlighting doesn't come back after a lsp restart.

expected:
it should come back.

Zed version and system specs

Zed: 0.227.1+stable.199.9f9b707d39d62468d4cdaed2d8eb95a847da4cf9
OS: MacOS 26.3
Memory: 16GB
Arch: aarch64

Attach Zed log file

Relevant Zed settings

settings.json
{
  "languages": {
    "Python": {
      "formatter": { "language_server": { "name": "ruff" } },
      "language_servers": ["ty", "ruff"],
    },
  },
  "semantic_tokens": "full",
}

Relevant Keymap

No response

(for AI issues) Model provider details

No response

If you are using WSL on Windows, what flavor of Linux are you using?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:language serverAn umbrella label for all language serversarea:tree-sitterSyntax highlighting and tree-sitterfrequency:commonBugs that happen for at least a third of the users across all platforms and kinds of usagepriority:P2Average run-of-the-mill bugsstate:reproducibleVerified steps to reproduce included and someone on the team managed to reproduce

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions