Skip to content

Add definition and references methods to LSPManager #13

Description

@amondnet

Summary

Add two essential LSP code navigation methods to the LSPManager class: definition() and references(). These methods enable users to jump to symbol definitions and find all references to a symbol in the codebase, following the LSP 3.17 specification.

Tasks

  • Implement definition() method with support for Location, LocationLink[], response formats
  • Implement references() method with support for Location[] response format
  • Add proper error handling and null checks for LSP responses
  • Add TypeScript type definitions for definition and reference responses
  • Write unit tests for both methods
  • Update documentation with usage examples
  • Verify implementation against LSP 3.17 specification

Acceptance Criteria

  • Both methods follow the LSP 3.17 specification for textDocument/definition and textDocument/references requests
  • Methods handle all possible response types (Location, Location[], LocationLink[])
  • Proper error handling for edge cases (no definition found, network errors, etc.)
  • Unit test coverage for all code paths
  • Integration tests with at least one language server

Additional Context

These methods are essential for implementing code navigation features in Claude Code and Dora. The implementation should follow the existing patterns in LSPManager and be consistent with other LSP methods in the codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lspp1Priority 1 - Hightype:featureNew feature or request

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions