Skip to content

smart expand selection (SelectionRange) #98

@michaeldistel

Description

@michaeldistel

Summary

Implement textDocument/selectionRange so Shift+Alt+Right progressively expands selection to enclosing AST nodes.

Scope

  • Expression → statement → block body → PROGRAM/FUNCTION_BLOCK/FUNCTION body → full declaration
  • Works in PROGRAM, FUNCTION_BLOCK, FUNCTION sections
  • Registered in LSP server capabilities

Implementation Notes

  • New SelectionRangeProvider in src/server/providers/
  • Walks AST from cursor position outward
  • Returns nested SelectionRange chain

Acceptance

  • Expand selection grows through expression, statement, block, and full declaration correctly
  • Shrink selection reverses
  • Tests cover nested expressions and block boundaries

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