Skip to content

Fix semantic highlighting for locals shadowing crate names - #1392

Open
zakazaka95 wants to merge 1 commit into
software-mansion:mainfrom
zakazaka95:fix/1302-local-variable-highlighting
Open

Fix semantic highlighting for locals shadowing crate names#1392
zakazaka95 wants to merge 1 commit into
software-mansion:mainfrom
zakazaka95:fix/1302-local-variable-highlighting

Conversation

@zakazaka95

Copy link
Copy Markdown

Summary

  • prioritize function-local pattern lookup before crate/module resolution during semantic highlighting
  • add regression coverage for a local snforge_std binding shadowing the crate name

This keeps the local declaration and its use classified as variables instead of namespaces.

Verification

  • added an end-to-end semantic-token regression test
  • git diff --check
  • the Rust test suite was not run locally because this environment has no Rust toolchain; CI should execute the new regression

Closes #1302

@zakazaka95
zakazaka95 requested a review from a team as a code owner September 1, 2026 22:08
@zakazaka95
zakazaka95 requested review from integraledelebesgue and maciektr and removed request for a team September 1, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect semantic highlighting for local var with the same name as crate name

1 participant