Skip to content

Conversation

@wenxuanjun
Copy link
Contributor

Fixed the parser to correctly recognize selective imports (e.g., import foo { Bar }), so "Go to Definition" and highlighting now work for symbols inside the curly braces.

Improved module resolution logic, which fixes issues in nested project structures (e.g., import bar now correctly resolves to foo.modules.bar). It also prioritizes workspace modules over the standard library, fixing cases where some symbols would jump to vlib instead of the local implementation.

Fixed a symbol shadowing bug. Global variables that share a name with their module are now correctly resolved as variables. Explicitly defined local variables named it are now correctly recognized, instead of being forced to be implicit array iterators.

Enabled indexing for the main function so it now appears in the Document Outline and symbol search. Fixed methods defined on Type Aliases were not resolved (e.g., x.bar() where x is a SumType). Restored broken syntax highlighting for the implements keyword. Fixed definition lookup jumping to incorrect global symbols and miss usages in files that imported the module using a shorter path (e.g. import bar but FQN is foo.modules.bar).

Resolves #153, resolves #149, resolves #17, resolves #107, resolves #159, resolves #98, resolves #103, resolves #151, resolves #105.

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Excellent work.
Thanks a lot @wenxuanjun 🙇🏻 .

@spytheman spytheman merged commit 052449d into vlang:main Dec 27, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment