Skip to content

Conversation

@doriable
Copy link
Member

This PR adds renaming capabilities to the Buf LSP, with
prepare rename request support.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 11, 2025

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedDec 12, 2025, 6:25 PM

@doriable
Copy link
Member Author

For valid symbol renames:

Screenshot 2025-12-11 at 17 19 13

Clients will handle when textDocument/prepareRename returns an empty range:

Screenshot 2025-12-11 at 17 18 19

@doriable doriable merged commit f581dd8 into main Dec 12, 2025
10 checks passed
@doriable doriable deleted the BSR-6012-lsp-rename branch December 12, 2025 18:30
@stefanvanburen
Copy link
Member

my only question on this one: should we error when renaming a symbol to something that would conflict with another symbol in the scope?

e.g., if in gopls I attempt to rename lock to shutdown here (where the shutdown symbol already exists), it'll fail and log an error:

image

It seems like we'll happily rename to a conflicting name, and just get a lint error after:

image

@doriable
Copy link
Member Author

my only question on this one: should we error when renaming a symbol to something that would conflict with another symbol in the scope?

Yeah, I think this is a good idea -- will put up a quick follow-up for this.

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.

4 participants