Skip to content

R syntax highlighting broken: variables not recognized as token, appear as plain white #1628

@leaves1021

Description

@leaves1021

Bug Description

After updating all my VSCode extensions today (including the R extension by REditorSupport), I noticed that R variables are no longer highlighted correctly. All variables appear as plain white text, while other elements (e.g., strings, functions, comments) are highlighted properly.

Using Developer: Inspect Editor Tokens and Scopes, I found that variables are only assigned the scope source.r, with no variable.other.r or other fine-grained scopes. As a result, my theme does not apply any color to variables.

Environment

  • VSCode version: 1.102.2.0
  • R extension version: R 2.8.6
  • R Syntax extension version: 0.1.3
  • Operating system: Windows 11 Pro (build 26100.4770)
  • Color theme: Pink Cat Boo

Steps to Reproduce

  1. Install the latest R and R Syntax extensions
  2. Open any .R file in VSCode
  3. Highlight any variable and run Developer: Inspect Editor Tokens and Scopes
  4. Observe that the scope is only source.r, with no variable-specific token
  5. Variable remains white regardless of theme
Image

Additional Info

  • Reinstalling / downgrading the R extension does not help
  • Changing color themes does not solve the issue
  • This issue did not occur before I updated all extensions today
  • Other users have reported similar issues recently

Expected Behavior

Variables in R files should be recognized with appropriate token scopes like variable.other.r, so that themes can apply custom colors.

Please let me know if I can help test or trace further.

Thank you for maintaining this extension!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions