Zig Version
0.16.0
ZLS Version
0.16.0
Client / Code Editor / Extensions
NVIM v0.12.3
Steps to Reproduce and Observed Behavior
open this snippet in your editor with zls enabled
pub fn main() void {
var bar = 5;
const refr = bar + 4;
_ = refr;
asm volatile (
\\ mov $5, %rax
: [ret] "={rax}" (bar),
);
}
then use lsp rename on bar (I use rn in nvim to activate lsp rename)
note that you can select any reference to bar, including the one inside the asm block. they all cause the same result.
the lsp renames all references of bar to the new name, ASIDE from the one inside the asm block.
actual output:
pub fn main() void {
var dummy = 5;
const refr = dummy + 4;
_ = refr;
asm volatile (
\\ mov $5, %rax
: [ret] "={rax}" (bar), // <-- this doesn't change!
);
}
Expected Behavior
the code turns into
pub fn main() void {
var dummy = 5;
const refr = dummy + 4;
_ = refr;
asm volatile (
\\ mov $5, %rax
: [ret] "={rax}" (dummy), // <-- this should change!
);
}
Attach ZLS log output
Zig Version
0.16.0
ZLS Version
0.16.0
Client / Code Editor / Extensions
NVIM v0.12.3
Steps to Reproduce and Observed Behavior
open this snippet in your editor with zls enabled
then use lsp rename on
bar(I usernin nvim to activate lsp rename)note that you can select any reference to bar, including the one inside the asm block. they all cause the same result.
the lsp renames all references of
barto the new name, ASIDE from the one inside the asm block.actual output:
Expected Behavior
the code turns into
Attach ZLS log output