feat(lsp): add Rename Symbol support#19
Merged
Merged
Conversation
[Auto-checkpoint from /please:dev Phase 6] Tasks completed: - T001: Add type schemas (TextEdit, WorkspaceEdit, PrepareRenameResult) - T002: Add rename capability to client initialization - T003: Add normalization methods (normalizeWorkspaceEdit, normalizePrepareRename) - T004: Add prepareRename() method - T005: Add rename() method Issue: #18
- Update CLAUDE.md with prepareRename/rename method documentation - Add 12 unit tests for TextEdit, WorkspaceEdit, PrepareRenameResult schemas - Add integration tests for prepareRename and rename LSP requests - Tests verify both valid rename operations and edge cases Part of #18
8 tasks
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19 +/- ##
==========================================
- Coverage 31.79% 29.72% -2.07%
==========================================
Files 4 4
Lines 1730 1904 +174
==========================================
+ Hits 550 566 +16
- Misses 1180 1338 +158 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Add debug logging to prepareRename() and rename() catch handlers - Filter out expected "method not found" errors from logging - Add input validation for empty/whitespace newName parameter - Update JSDoc to clarify null return semantics - Add unit tests for empty newName validation - Add documentation test for documentChanges normalization Addresses PR #19 review feedback: - Silent error handling now logs unexpected failures - Ambiguous null returns are now documented
- Fix JSDoc @param syntax in rename() method - Update eslint config to ignore spec/doc markdown files - Add 4 more integration tests for edge cases: - Empty newName validation (integration) - Whitespace-only newName validation (integration) - Non-existent file handling for prepareRename - Non-existent file handling for rename Note: Patch coverage gap is primarily due to: - Private helper methods exercised through integration tests - Error catch blocks requiring LSP server failures to trigger
Disable eslint --cache flag to prevent platform-specific cache issues between local development and CI environments.
- Add husky for git hooks management - Configure lint-staged to run eslint --fix on staged JS/TS files - Use lint-staged --diff in CI for PR changed files only - Keep full lint for push to main branch
Merged
amondnet
added a commit
that referenced
this pull request
Dec 18, 2025
- Mark Rename Symbol as completed in TODO.md (PR #19) - Add prepareRename and rename methods to packages/lsp/README.md - Update session tasklist to reflect completed implementation
amondnet
added a commit
that referenced
this pull request
Dec 18, 2025
- Mark Rename Symbol as completed in TODO.md (PR #19) - Add prepareRename and rename methods to packages/lsp/README.md - Update session tasklist to reflect completed implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements LSP Rename Symbol support (
textDocument/prepareRenameandtextDocument/rename) for the@pleaseai/code-lsppackage.Changes
TextEdit,WorkspaceEdit,PrepareRenameResult) with Zod validationprepareRename()method to validate rename at positionrename()method to perform symbol renamechangesanddocumentChangesWorkspaceEdit formatsprepareSupport: true) to client initializationArchitecture Decisions (from Serena reference)
documentChangesformat tochangesfor consistent handlingTest plan
Closes #18