Closed ValouBambou closed 10 months ago
The source cause seems to be line 43 in renamer.lua which use a string as lua input command. I'm not sure on how to change this since I'm not fluent in lua, maybe there is some escape function to apply before ?
After trying a dummy fix of simply adding single quotes to the 2 lua strings, it worked. I will open a PR for submitting the quick fix on top of the current implementation.
Also creating lua code from string from user input is a clever trick to get the implementation working on most cases but I think this is a dirty hack since code injection is possible, and should be avoided.
Describe the bug LSP rename failed when the initial variable name is "end". I tested with 2 lsp (pyright and rust analyzer) but the raised error seems lua related.
To Reproduce Steps to reproduce the behavior:
end = 1; print(end)
. 2, Rename the end variable to another name.Expected behavior Rename is effective without error.
Screenshots
Desktop :
Also tested on WSL with an older neovim and the result is the same.