godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.57k stars 168 forks source link

Rename symbol sometimes does not work properly #448

Closed GianptDev closed 1 year ago

GianptDev commented 1 year ago

Godot version

3.5.stable

VS Code version

1.74.2

Godot Tools VS Code extension version

1.3.1

System information

Windows 10

Issue description

Sometimes when I rename a variable, such as a constant or class name, anything that has a similar name but is not related to a variable get renamed too, renaming symbols does not take in account object properties and sometimes renaming will not work at all.

example:


class Thing extends Reference:
    var foo: bool = false; # Want to rename this to "different".

func bar () -> void:
    var new_thing: = Thing.new();
    var foo: bool = true; # this is renamed to "different".

    new_thing.foo = true; # This is untouched.

    for a in range(10): # renaming a to b does nothing.
        print(a);

Steps to reproduce

right click -> rename symbol

I tried classes and loops, those seem to have more problems.

atirut-w commented 1 year ago

This is a duplicate of #361, which should also have been closed since this issue is with Godot's LSP server. See https://github.com/godotengine/godot/issues/65563