feat(rename): recursive rename & duplicated names warning#215
Merged
Conversation
fefd4de to
bf756a9
Compare
|
Docs preview: https://vide.pascal-lab.net/preview/pr-215/ |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends Vide’s rename pipeline to support a recursive/expanded rename flow (following same-name port/signal connection chains) and adds LSP/VS Code plumbing to surface “expanded rename” and “rename conflict info” commands to clients.
Changes:
- Add new LSP extension commands + params/results for expanded rename and conflict/expansion info.
- Implement recursive rename target discovery and rename-collision preflight in the IDE rename engine (including same-name port connection collapsing like
.a(a)→.renamed). - Wire the functionality through server request handling, capability advertisement, VS Code clients (desktop + browser), and add/extend tests.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/tests.rs | Adds integration-style tests and helpers to exercise the new executeCommand-based rename flow. |
| src/lsp_ext/ext.rs | Introduces new extension command identifiers and typed params/results for expanded rename and rename info queries. |
| src/global_state/handlers/request.rs | Handles the new executeCommand routes and centralizes executeCommand arg extraction. |
| src/config/caps.rs | Advertises the new executeCommand commands in server capabilities. |
| editors/vscode/src/extension.ts | Adds rename middleware to prompt for recursive rename + collision confirmation and requests expanded edits via executeCommand. |
| editors/vscode/src/browser/client.ts | Mirrors the rename middleware behavior for the browser client. |
| editors/vscode/l10n/bundle.l10n.zh-cn.json | Adds zh-CN localizations for new rename prompts/actions. |
| crates/utils/src/uniq_vec.rs | Adds a small utility for uniqueness-tracked vectors used by recursive rename logic. |
| crates/utils/src/lib.rs | Exports the new uniq_vec module. |
| crates/ide/src/verilog_2005.rs | Adds tests validating expanded rename behavior and rename conflict info in Verilog 2005 scenarios. |
| crates/ide/src/rename.rs | Implements recursive rename target discovery, expanded rename execution, and rename-collision preflight (including same-name connection collapsing). |
| crates/ide/src/analysis.rs | Exposes the new rename APIs via Analysis. |
| crates/hir/src/type_infer.rs | Refactors name resolution to reuse shared resolver logic. |
| crates/hir/src/semantics/pathres.rs | Exposes shared resolve_name utility (and a Semantics wrapper) for consistent name resolution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
hongjr03
requested changes
Jun 3, 2026
c87827b to
683b9a3
Compare
683b9a3 to
dcb9459
Compare
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
Testing