Summary
Implement textDocument/typeDefinition to navigate from a variable to its type declaration (e.g. FUNCTION_BLOCK or TYPE definition).
Scope
- From a variable instance, navigate to its declared type (FB, struct, enum, alias)
- Works for variables declared as
VAR myTimer : TON;
- Cross-file via workspace indexer
Implementation Notes
- Extend or add alongside
DefinitionProvider
- Resolve the declared type of the symbol under cursor, then jump to that type's definition site
Acceptance
- Cursor on FB instance variable navigates to FB declaration
- Cursor on struct field navigates to TYPE block
- Works cross-file
- Tests cover local and cross-file cases
Summary
Implement
textDocument/typeDefinitionto navigate from a variable to its type declaration (e.g. FUNCTION_BLOCK or TYPE definition).Scope
VAR myTimer : TON;Implementation Notes
DefinitionProviderAcceptance