zls icon indicating copy to clipboard operation
zls copied to clipboard

Can't rename struct property

Open dmbfm opened this issue 4 years ago • 4 comments

When I try to rename the property of a struct nothing happens.

https://user-images.githubusercontent.com/8743306/135007174-d9783621-a3c7-404b-8d52-db9dd51900a2.mov

I'm using neovim with lsp, and compiled zls from HEAD two days ago.

I'm quite new to Zig and zls, so I'm not sure if this is a bug or just a current limitation of zls.

dmbfm avatar Sep 28 '21 01:09 dmbfm

if you highlight the field name is the behavior any different?

nektro avatar Sep 30 '21 02:09 nektro

also potentially relevant: https://microsoft.github.io/language-server-protocol/specification#textDocument_rename

nektro avatar Sep 30 '21 02:09 nektro

if you highlight the field name is the behavior any different?

Not really. I don't think highlighting symbols in neovim would make any difference.

dmbfm avatar Oct 05 '21 22:10 dmbfm

I just tried the same operation using vscode (same zls build) and I get a "No result" message.

dmbfm avatar Oct 05 '21 22:10 dmbfm

can confirm this is not working yet

image

Jarred-Sumner avatar Dec 29 '22 05:12 Jarred-Sumner

renaming struct fields appears to be working since 8b989e96afd5a3c669e2386810daf8719a1859c6 (see #1565) There are probably many situation where it is still borked but those should be handled as new issue since the give example is working.

Techatrix avatar Nov 06 '23 19:11 Techatrix