Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete Rename Range Resolver #5

Open
ankitpriyarup opened this issue Aug 10, 2019 · 1 comment

Comments

@ankitpriyarup
Copy link
Owner

commented Aug 10, 2019

Rename functionality supported over LSP must work differently then 'change all occurrence' it renames symbol anywhere present within that document without looking within the current scope. The scraped implementation of rename functionality works fine and matches symbol within scope however it fails to achieve the result while renaming symbols which are reference from other files.

For other gdscript file to use that symbol it must either utilize the export - get function in that case it is a different function variable name will be handled
export (Texture) var texture setget _set_texture

Other way to do it is through: get_node("yourNode").get("yourVariable") This case is not handled and I wonder to implement this functionality we have to search for the node_name along with variable in all files present in the project. However doing this will be inefficient. Maybe modifying the current symbol pool to include both it's scope and also external reference will solve this problem

@Jason0214

This comment has been minimized.

Copy link

commented Aug 14, 2019

I was thinking we can try to build a node tree and figure out the external reference between nodes. So instead of creating external symbols in symbol pool, we can just dispatch a rename into other GDScriptTextDocument.

VScode workspace can be opened everyone, we may not able to create the whole node tree, but we may get a subtree that reference the editting script file. If we utilize as many information we can find (i.e. all the node tree or subtree we can find), it looks a compact implementation to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.