Skip to content

linked editing for paired keywords #105

@michaeldistel

Description

@michaeldistel

Summary

Implement textDocument/linkedEditingRange so that renaming a PROGRAM, FUNCTION_BLOCK, or FUNCTION declaration name simultaneously updates the paired closing keyword.

Scope

  • Paired keywords: FUNCTION_BLOCK / END_FUNCTION_BLOCK, FUNCTION / END_FUNCTION, PROGRAM / END_PROGRAM
  • Editing the name after the opening keyword updates the trailing comment or paired identifier if present

Implementation Notes

  • New LinkedEditingProvider in src/server/providers/
  • Register linkedEditingRangeProvider capability in server.ts

Acceptance

  • Editing the name in an opening keyword reflects in the closing label (if used)
  • Does not fire in comments or strings
  • Tests cover PROGRAM, FUNCTION_BLOCK, and FUNCTION

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions