zed
zed copied to clipboard
Tags Auto-Rename
Check for existing issues
- [X] Completed
Describe the feature
Add a setting that allows linked editing of related symbols, such as HTML tags.
The request comes from this discussion post.
If applicable, add mockups / screenshots to help present your vision of the feature
No response
+1 👍 to this issue! It's the one feature stopping me from using Zed - more than happy to try and learn Rust and whip up a plugin ~once Zed becomes extensible though!~ it's game time
I've looked into this following https://x.com/iangrayhazzard/status/1792720672701268178 and it seems like we just don't do renaming for HTML language server? VSCode sends out a request for rename according to LSP spec whereas we do.. nothing. Triggering "Rename Symbol" on HTML tag does nothing; no communication from our side to the server, nada, null. I'll look into why that is. I suspect that the "linked editing" bit comes from language server itself.
Then, for linked editing itself we probably need to implement support for https://docs.rs/lsp-types/latest/lsp_types/request/enum.LinkedEditingRange.html
Is there a way to disable this in settings? It's causing some minor issues for me. One it adds a space to the closing tag if you go to add attributes on the opening tag. Plus I'm so accustomed to using multi-cursor for this that I end up causing this feature to duplicate every keystroke.
@corneliusio Sure, you can disable it with:
"languages": {
"language-you-want-to-disable-linked-editing-for":
{
"linked_edits": false
}
}
@osiewicz 🙏🏼 Thank you!