Skip to content

Add constant highlighting for ALL_CAPS variables - #1832

Closed
AryanBagade wants to merge 1 commit into
facebook:mainfrom
AryanBagade:feature/issue-1780-semantic-highlighting-constants
Closed

Add constant highlighting for ALL_CAPS variables#1832
AryanBagade wants to merge 1 commit into
facebook:mainfrom
AryanBagade:feature/issue-1780-semantic-highlighting-constants

Conversation

@AryanBagade

@AryanBagade AryanBagade commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

Fixes #1780

Summary

Configure VSCode extension and web sandbox to highlight constants (ALL_CAPS variables) in a distinct teal color. The backend already detects ALL_CAPS variables as constants and sends the readonly modifier - this change ensures they're visually distinguished in both the VSCode extension and the pyrefly.org sandbox.

Test Plan

sandbox ui
CleanShot 2025-12-11 at 22 49 06@2x

vscode
CleanShot 2025-12-11 at 22 48 11@2x

@meta-cla meta-cla Bot added the cla signed label Dec 12, 2025
@kinto0

kinto0 commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

cool! thanks for the research and exhaustive test plan

@meta-codesync

meta-codesync Bot commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

@kinto0 has imported this pull request. If you are a Meta employee, you can view this in D89060103.

@yangdanny97 yangdanny97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@kinto0 kinto0 self-assigned this Dec 12, 2025
@meta-codesync meta-codesync Bot closed this in c3cf749 Dec 12, 2025
@meta-codesync

meta-codesync Bot commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

@kinto0 merged this pull request in c3cf749.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Semantic highlighting: Highlight some top level variables as constants

4 participants