feat(lsp): implement LspRuntime capability methods — diagnostics, hover, definition, completions, references, rename #7429

Open
opened 2026-04-10 19:13:42 +00:00 by HAL9000 · 0 comments
Owner

Metadata

  • Commit Message: feat(lsp): implement LspRuntime capability methods — diagnostics, hover, definition, completions, references, rename
  • Branch: feature/m6-lsp-runtime-capabilities
  • Milestone: v3.5.0
  • Parent Epic: #934

Background and Context

After the LSP server lifecycle is implemented (#7427), the LspRuntime needs to expose all LSP capabilities as callable methods. Currently all capability methods raise LspNotAvailableError.

Expected Behavior

All LSP capability methods execute real LSP requests and return structured results:

  • get_diagnostics(file_path) → list of diagnostic objects
  • get_hover(file_path, line, col) → hover information
  • get_definition(file_path, line, col) → definition location
  • get_completions(file_path, line, col) → completion items
  • get_references(file_path, line, col) → reference locations
  • get_rename(file_path, line, col, new_name) → workspace edit

Acceptance Criteria

  • LspRuntime.get_diagnostics() sends textDocument/diagnostic request and returns parsed diagnostics
  • LspRuntime.get_hover() sends textDocument/hover and returns hover content
  • LspRuntime.get_definition() sends textDocument/definition and returns location
  • LspRuntime.get_completions() sends textDocument/completion and returns items
  • LspRuntime.get_references() sends textDocument/references and returns locations
  • LspRuntime.get_rename() sends textDocument/rename and returns workspace edit
  • All methods handle LSP server not started (auto-start or raise LspNotAvailableError)
  • BDD scenarios cover each capability method
  • Coverage >= 97%

Dependencies

  • Must be done after: #7427 (LspRuntime core lifecycle)

Subtasks

  • Implement LspRuntime.get_diagnostics() with textDocument/diagnostic request
  • Implement LspRuntime.get_hover() with textDocument/hover request
  • Implement LspRuntime.get_definition() with textDocument/definition request
  • Implement LspRuntime.get_completions() with textDocument/completion request
  • Implement LspRuntime.get_references() with textDocument/references request
  • Implement LspRuntime.get_rename() with textDocument/rename request
  • Tests (Behave): Add scenarios for each capability method
  • Verify coverage >= 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Automated by CleverAgents Bot
Supervisor: Epic Planner | Agent: epic-planning-pool-supervisor

## Metadata - **Commit Message**: `feat(lsp): implement LspRuntime capability methods — diagnostics, hover, definition, completions, references, rename` - **Branch**: `feature/m6-lsp-runtime-capabilities` - **Milestone**: v3.5.0 - **Parent Epic**: #934 ## Background and Context After the LSP server lifecycle is implemented (#7427), the `LspRuntime` needs to expose all LSP capabilities as callable methods. Currently all capability methods raise `LspNotAvailableError`. ## Expected Behavior All LSP capability methods execute real LSP requests and return structured results: - `get_diagnostics(file_path)` → list of diagnostic objects - `get_hover(file_path, line, col)` → hover information - `get_definition(file_path, line, col)` → definition location - `get_completions(file_path, line, col)` → completion items - `get_references(file_path, line, col)` → reference locations - `get_rename(file_path, line, col, new_name)` → workspace edit ## Acceptance Criteria - [ ] `LspRuntime.get_diagnostics()` sends `textDocument/diagnostic` request and returns parsed diagnostics - [ ] `LspRuntime.get_hover()` sends `textDocument/hover` and returns hover content - [ ] `LspRuntime.get_definition()` sends `textDocument/definition` and returns location - [ ] `LspRuntime.get_completions()` sends `textDocument/completion` and returns items - [ ] `LspRuntime.get_references()` sends `textDocument/references` and returns locations - [ ] `LspRuntime.get_rename()` sends `textDocument/rename` and returns workspace edit - [ ] All methods handle LSP server not started (auto-start or raise `LspNotAvailableError`) - [ ] BDD scenarios cover each capability method - [ ] Coverage >= 97% ## Dependencies - [ ] Must be done after: #7427 (LspRuntime core lifecycle) ## Subtasks - [ ] Implement `LspRuntime.get_diagnostics()` with `textDocument/diagnostic` request - [ ] Implement `LspRuntime.get_hover()` with `textDocument/hover` request - [ ] Implement `LspRuntime.get_definition()` with `textDocument/definition` request - [ ] Implement `LspRuntime.get_completions()` with `textDocument/completion` request - [ ] Implement `LspRuntime.get_references()` with `textDocument/references` request - [ ] Implement `LspRuntime.get_rename()` with `textDocument/rename` request - [ ] Tests (Behave): Add scenarios for each capability method - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. --- **Automated by CleverAgents Bot** Supervisor: Epic Planner | Agent: epic-planning-pool-supervisor
HAL9000 added this to the v3.5.0 milestone 2026-04-10 19:14:40 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#7429
No description provided.