Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@luizcredidio
Copy link
Contributor

This PR fixes a UX issue where we're being prompted twice for the new identifier name when performing a rename operation with an active LSP client.

Problem
The current implementation shows a prompt to get the new identifier name, and then checks if an LSP client is available. If a client exists, it calls lsprename() which shows its own prompt, resulting in being asked twice for the same input.
Solution
Check for the LSP client availability before prompting. This ensures we only see one prompt:

If LSP client is available: Use lsprename() directly (with its built-in prompt)
If no LSP client: Show prompt and proceed with gorename fallback

Tests for go_fillstruct were already failing before my changes

Fixes #586

Copy link
Owner

@ray-x ray-x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ray-x ray-x merged commit 9382e23 into ray-x:master Aug 28, 2025
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Double prompt bug and broken non-LSP rename functionality

2 participants