rust-lang / rust-lang/rust-analyzer

`textDocument/semanticTokens/full/delta` doesn't work

Open
#8,253 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S-actionable
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

Hello, from initialize capabilities, rust-analyzer responses with full: {delta: true}, but in my tests, rust-analyzer doesn't response for delta request:

Full request:

Sending request 'textDocument/semanticTokens/full - (22)'.
Params: {
    "textDocument": {
        "uri": "file:///Users/fannheyward/src/hello-rust/src/main.rs"
    }
}

Full response:

Received response 'textDocument/semanticTokens/full - (22)' in 6886ms.
Result: {
    "resultId": "1",
    "data": [
        0,
        0,
        2,...
    ]
}

Delta request:

Sending request 'textDocument/semanticTokens/full/delta - (37)'.
Params: {
    "textDocument": {
        "uri": "file:///Users/fannheyward/src/hello-rust/src/main.rs"
    },
    "previousResultId": "1"
}

Delta response, still full response:

Received response 'textDocument/semanticTokens/full/delta - (37)' in 21ms.
Result: {
    "resultId": "2",
    "data": [
        0,
        0,
        2,...
    ]
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report provides no source file or test path. Start by tracing handling of textDocument/semanticTokens/full/delta and compare it with full handling; reproduce the shown previousResultId and resultId exchange, with done meaning the delta request returns the protocol's delta form rather than a full data array.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.