Skip to content

Go to Type Definition #100

@michaeldistel

Description

@michaeldistel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: LowenhancementNew feature or requestlspLanguage Server Protocol relatedv1.4.0Release 1.4.0v1.5.0Release 1.5.0

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions