microsoft / microsoft/TypeScript

vscode.provideDocumentSemanticTokens returns null when using native preview with built-in TS extension disabled

Open
#64,021 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs More Info
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

### 🔎 Search Terms

vscode.provideDocumentSemanticTokens

### 🕗 Version & Regression Information

- `textDocument/semanticTokens/full` are computed as shown in output panel.
- editor renders semantic highlighting correctly
- But `vscode.provideDocumentSemanticTokens` returns null/undefined when called from another extension
- other language ext that register `DocumentSemanticTokensProvider` works though. even `pwsh`

### ⏯ Playground Link

_No response_

### 💻 Code

```ts
// Your code here
```

### 🙁 Actual behavior

inconsistent sem token return

### 🙂 Expected behavior

should be consistent in output panel and when called from another ext

### Additional information about the issue

_No response_

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

Start by reproducing the issue with the native preview enabled and the built-in TypeScript extension disabled, comparing the output panel's textDocument/semanticTokens/full result with vscode.provideDocumentSemanticTokens from another extension. The issue is done when the API behavior is consistent with the output panel for TypeScript, with regression coverage or a documented limitation if the behavior is intentional.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.