rescript-lang / rescript-lang/rescript-vscode

Semantic Tokens: tokens are getting called `namespace` using `arr[idx] = value` syntax

Open
#801 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
ReScript
Stars
354
Forks
63
Avg merge
11h 29m
Merged PRs (30d)
1

Description

Here is another case where tokens are getting called namespace rather than what it should be (in this case variable). (v1.18.0)

Color is weird:
a

Token output:

b
dr
c

Originally posted by @mooreryan in https://github.com/rescript-lang/rescript-vscode/issues/797#issuecomment-1668660139

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 semantic-token output for arr[idx] = value and compare the reported namespace classification with the expected variable classification. Trace the semantic-token handling involved in the VSCode plugin; done means this syntax is classified and colored as a variable rather than a namespace.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.