Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimize semantic tokens returned for local variables #2482

Merged
merged 3 commits into from
Aug 23, 2024

Conversation

vinistock
Copy link
Member

Motivation

Similar to #2479, this PR minimizes the number of semantic tokens returned to the editor for local variables.

We don't need to return semantic tokens for most local variable assignments, because they can be detected with Text Mate grammars.

Implementation

In the grammar, I added rules for local variable assignments. In the server, I removed handling of local variable assignments. We still need to handle local variable read, to differentiate between parameters and local variables.

Automated Tests

Updated the expectations.

@vinistock vinistock added enhancement New feature or request server This pull request should be included in the server gem's release notes labels Aug 23, 2024
@vinistock vinistock self-assigned this Aug 23, 2024
@vinistock vinistock requested a review from a team as a code owner August 23, 2024 20:12
@vinistock vinistock requested review from andyw8 and st0012 August 23, 2024 20:12
Base automatically changed from vs-minimize-semantic-tokens to main August 23, 2024 20:43
@vinistock vinistock force-pushed the vs-minimize-local-var-tokens branch from 3d2af6b to 4cefb4d Compare August 23, 2024 20:44
@vinistock vinistock requested a review from st0012 August 23, 2024 21:18
@st0012 st0012 added the vscode This pull request should be included in the VS Code extension's release notes label Aug 23, 2024
@vinistock vinistock merged commit a101647 into main Aug 23, 2024
36 checks passed
@vinistock vinistock deleted the vs-minimize-local-var-tokens branch August 23, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server This pull request should be included in the server gem's release notes vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants